ycphs / openxlsx

openxlsx - a fast way to read and write complex xslx files
https://ycphs.github.io/openxlsx/
Other
226 stars 75 forks source link

Corrupt Excel file when column name is `NA` #292

Closed bersbersbers closed 10 months ago

bersbersbers commented 2 years ago

Describe the bug When a dataframe's column name is NA, openxlsx writes a corrupt Excel file (according to Microsoft Excel 2016):

To Reproduce

df <- data.frame("A", "B")
colnames(df) <- c(1, NA)

wb <- openxlsx::createWorkbook()
openxlsx::addWorksheet(wb, "sheet")
openxlsx::writeData(wb, 1, df)
openxlsx::saveWorkbook(wb, "temp.xlsx", overwrite = TRUE)

Screenshots image

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.

bersbersbers commented 1 year ago

(Removing stale label by commenting)

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 10 months ago

This issue was closed because it has been stalled for 7 days with no activity.

bersbersbers commented 10 months ago

Still an issue.