Mark

Mark

  • 1.1k
  • 609
  • 610

Creating Excel file using open XML

Apr 22 2024 4:57 AM

I have been using the code example here for creating-excel-file-using-openxml this is simple enough code and it does work nicely i can send my data and save it as an .xlsx  file. However when i open the file it is corrupted and needs to be opend as repaired. when i do open it all the data is there the formatting/styles are nissing but all the data is there.

looking at the log file i see this

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="------schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error290880_01.xml</logFileName><summary>Errors were detected in file 'D:\M36_Results_22_04_2024 2_46_34 PM.xlsx'</summary><repairedRecords><repairedRecord>Repaired Records: Format from /xl/styles.xml part (Styles)</repairedRecord><repairedRecord>Repaired Records: Cell information from /xl/worksheets/sheet1.xml part</repairedRecord></repairedRecords></recoveryLog>

any help appreciated. i am new to openXML

 


Answers (1)