ddotta / tablexlsx

R package to export data frames from R to xlsx workbook
https://ddotta.github.io/tablexlsx/
Other
16 stars 1 forks source link

`mergecol` argument drops the Excel table layout #16

Closed JulienBlasco closed 7 months ago

JulienBlasco commented 7 months ago

The following code

library(tablexlsx)

tmp <- tempdir()
toxlsx(iris, path=tmp, mergecol = c("Species"))

currently produces a faulty Excel file (see screenshot below):

image

After reparation, the table layout is dropped.

This is probably due to the fact that Excel tables cannot contain merged cells (which is probably not a bug, but a feature).

Expected result

When the mergecol argument is used, toxlsx should not try to write data as a table.