IowaComputerGurus / netcore.utilities.spreadsheet

A utility to assist in creating Excel spreadsheets in .NET 6+ applications
MIT License
22 stars 3 forks source link

The file generated on Linux corrupted #62

Closed wzhou-grid closed 10 months ago

wzhou-grid commented 10 months ago

I am using .NET 6 and the library version is 7.2.0. The Excel file can be generated on both Windows and CentOS 7. However, the file generated on Linux cannot be opened. The error message is: 'We found a problem with some content in example.xlsx'. Furthermore, the file size when generated on Linux is larger compared to when it is generated on Windows.

mitchelsellers commented 10 months ago

@wzhou-grid Any chance you can either post here, or email us a copy of different results?

wzhou-grid commented 10 months ago

Sorry, it was my bad. The generated file on server is downloaded via an ajax call on the clients side. I forgot to add xhrFields:{ responseType: 'blob' }, in the ajax. After adding the above codes, everything works fine.

mitchelsellers commented 10 months ago

Awesome, glad you got it working!