tableName arg does not work in openxlsx package

I am using openxlsx library to create a workbook

wb = openxlsx::buildWorkbook(x= df, asTable = T, sheetName = "siteChar", startCol = "A", startRow = 2, colNames = T, borders = "all", tableName = "tabName",)

followed by saving the above workbook:

openxlsx::saveWorkbook(wb = wb, file = "wb.xlsx", overwrite = T)

These commands work fine, except that when i opened by wb.xlsx file manually, I do not see the tableName I assigned although I see the dataframe I created.

I also tried writeDataTable function to include a different dataframe and to assign it a tableName

openxlsx::writeDataTable(wb = wb, sheet = 1, x = df2, startCol = 5, startRow = 2, tableName = "tabName2")

followed by saveWorkbook()

I can add a new dataframe as I wanted, but i do not see the tableName I assigned when I manually open the excel workbook.

can you help me on how to add a tableName to each dataframe I in my excel workbook?

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.