ycphs / openxlsx

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

Error in write_worksheet_xml_2(prior = prior, post = post, sheet_data = ws$sheet_data, : CHAR() can only be applied to a 'CHARSXP', not a 'NULL' #457

Closed mingerman311 closed 7 months ago

mingerman311 commented 7 months ago

Describe the bug I will run a script using openxlsx and it will run perfectly, then I add a tab to the excel sheet that only uses formulas within the sheet, and I no longer can save Workbook(). I get this error:

Error in write_worksheet_xml_2(prior = prior, post = post, sheet_data = ws$sheet_data,  : 
  CHAR() can only be applied to a 'CHARSXP', not a 'NULL'

And sometimes I get this error even without adding that extra tab! It is very inconsistent and frustrating

Expected behavior I expect saveWorkbook() to save