RaymarMonte / apex-create-xlsx

A guide and example on how to create Excel .xlsx files on Apex Programming Language
MIT License
16 stars 11 forks source link

Sample XLSX file is corrupt #4

Open tkeitt85 opened 4 months ago

tkeitt85 commented 4 months ago

Hi Raymar, Thanks so much for sharing this amazing repo! I was in the process of testing it out but the sample xlsx file that is generated will not open in Excel. Oddly enough, I'm able to open the same file in google sheets without any issues.

Has anything changed or am I overlooking something?

Thank you for any insight you might have! Tracey

Corrupt Excel file Cannot be repaired

mastaflamasta commented 1 month ago

Excel is missing this file in the zipped xlsx document: _rels/.rels The interesting thing is, that this file is included in the repo, but Salesforce is ignoring it when the template (StaticResource) is deployed to org as a zip archive. Maybe files with name starting with a dot are treated as hidden files and ignored. It looks like a bug in Salesforce and it won't work until they fix it.

bbarlow-knauf commented 3 weeks ago

@tkeitt85 I was able to work around this issue by downloading the zip file from my orgs static resources in settings. I then added the missing files to the zip file and uploaded the zip file in settings and ran the demo code again and was then able to open the file in Excel