Closed Belgian93 closed 5 years ago
Furthermore I'd like to add that both in google spreadsheets and in Libre Office, the formulas in the cells are identical, however one results in Err 508 and the other is functional
That's why I think the answer lies somewhere in the xml files, either in the header or in the bulk of the xml. I noticed the google spreadsheet sheet1.xml has all quotes in the formula translated to '"', whereas the excelize generated file has literal quotes.
Formula incorrect after all, semicolons instead of commas to distinguish strings from cell references. Usage of ";" or "," as list seperator is regional, check your settings.
Description I'm using excelize to export data from a postgresql db to excel, making it available to clients through our Go API.
When downloading the excel file from our API and opening it in LibreOffice the cell with the (rather complex) formula will throw Error: 508 In MS Office, a prompt will ask user to repair the xlsx file even before opening, repairing will remove the formula in said cell. Opening the file in google spreadsheets works fine, when exporting from google spreadsheets and opening the file in MS/Libre Office will make the file behave as expected.
Tried analyzing both files (file1: from api; file2: exported from gogole spreadsheets) after unzipping, but I know too little about the file structure of xlsx to find what causes this issue. Upgraded to v2, maybe this was a bug in older version, but no luck.
Below an example of code that will produce this bug, I omitted all other code that is irrelevant for this issue. Notice the complexity of the formula (we want clients to be able to generate valid json from their excel). This formula should be correct, it works on all platforms when pasted directly into a cell.
Steps to reproduce the issue:
Describe the results you received: File is corrupted for MS Office, and Error 508 (Pair missing) for Libre Office
Describe the results you expected: Working formula in cell, as it does work on google spreadsheets, and copying the formula directly in the cell does too.
Expected formula in cell:
Attachements: excelizeGenerated.xlsx googleExported.xlsx
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
Operating System:
LibreOffice Calc version:
MS Excel for Mac version: