I am using
openxlsx library to create a
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
openxlsx::writeDataTable(wb = wb, sheet = 1, x = df2, startCol = 5, startRow = 2, tableName = "tabName2")
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?