ycphs / openxlsx

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

writeDataTable() not constructed as error suggests #372

Closed millermc38 closed 1 month ago

millermc38 commented 2 years ago

In version 4.2.5 of openxlsx, if you do writeDataTable() with two variables that have the same name but different capitalization/casing, you get the following error: "colNames must be a unique vector (case sensitive)". Change assert_unique(...,case_sensitive=TRUE), which is currently set to false.

Example:


test_df<-data.frame(hi=1,Hi=2)

#Libraries
library(openxlsx)

#Overwrite any other workbooks open/initiate a new one.
wb <- createWorkbook()

addWorksheet(wb = wb,
             sheetName = "test")

writeDataTable(wb = wb,
               sheet = 1,
               x = test_df,
               tableStyle = "none",)
TheSoundOfSnowCrunchingUnderYourFeet commented 1 year ago

I am having the same issue in version 4.2.5.2 of openxlsx. When will this bug be fixed?

github-actions[bot] commented 2 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 1 month ago

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