Hello,
I have a controller action where I can read an excel file, convert it to base64 send it to the front end, and decode it using a javascript function I found here on this forum.
However the problem arises when I make edits to the loaded excel through a library such as OpenXML/ClosedXML, etc... Sometimes the array size of the excel changes, sometimes it is the same but, no matter what the spreadsheet component CAN NOT read a file saved by either packages. They work fine when saved through normal excel.
Is there any way I can fix this? Maybe some other excel library I'm missing? The edits I need to do are fairly trivial. I'll just replace cell values, nothing more.
Thanks!
Ps: Project is in .NET Core 3.1
4 Answers, 1 is accepted
Hi Rei,
We have not tested how files created by the OpenXML/ClosedXML libraries are loaded in the Spreadsheet widget. Nevertheless, if the file format is the correct one, the created files should be properly loaded in the widget. Could you, please, prepare and send us a small isolated .Net Core sample demonstrating how you load the file in the Spreadsheet and a sample file revealing the issue observed? This way we will be able to troubleshoot the issue locally and to provide you with the most appropriate assistance on the above.
As per alternative approaches to manipulate XLSX files on the server, I would recommend you our SpreadProcessing library. Here is where you could find further information on the above:
https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/overview
Regards,
Veselin Tsvetanov
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.

Hi Veselin,
I thought that library is not available on .NET Core. I'll give that one a shot. I'll provide feedback or submit a sample .NET core app if I can't get it done myself.
Thank you!
Hello Rei,
Take your time to test the suggested and let me know if you need any assistance in using the Telerik SpreadProcessing library with the Spreadsheet widget.
Regards,
Veselin Tsvetanov
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.

Hi Alex,
In general, if ClosedXML produces valid non-corrupted xlsx files the Spreadsheet widget should handle them. Can you send as a very small test file that reveals the issue in question? We may be able to identify the exact issue causing the failure.
Hi Alex and thank you for the sample file prepared.
I have validated the file in question with the OOXML Validator available for VS Code:
https://marketplace.visualstudio.com/items?itemName=mikeebowen.ooxml-validator-vscode
but I did not identify any issues in the file.
Moreover, I have compared the structure and contents of the file in question to the version of the same file created by Excel upon saving it (that loads properly in the Spreadsheet). I did not manage to identify important differences apart from the package folder that is not present in the Excel created file. Unfortunately, even if removed from the package, the Spreadsheet widget did not load the file properly.
I am afraid, that at this stage I cannot think of any other steps that would allow me to further troubleshoot the case.