Error exporting excel

Hi,

I am using the Export to Excel functionality of the grid, the export works, however, in some cases when opening the exported file, Excel gives the following error: "We found a problem with some content in ’Export.xlsx’. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes." if you click on yes, the exported data seems to be ok.

You can reproduce this error by running any of the export examples in your webpage: https://blazor.syncfusion.com/documentation/datagrid/excel-exporting

Could you please let me know how to fix this?

Thank you,

Cristobal.


5 Replies

SP Sarveswaran Palani Syncfusion Team July 25, 2023 01:49 PM UTC

Hi Cristobal,

Greetings from Syncfusion support.

Based on your query, we suspect that you're facing an issue while exporting an Excel file from the grid. We have prepared a sample in the latest version, following your requirements. However, we are unable to replicate the mentioned error at our end. We have tested this sample on 3 to 4 different machines, but the error does not occur.

To further investigate and understand the issue you're experiencing, we kindly request you to share a video demo of the problem along with the replication procedure. This will be extremely helpful for us in validating your query and providing a precise solution as soon as possible from our end. For your convenience, we have attached the sample and video demo for your reference.

Regards,
Sarvesh


Attachment: SfGridExcel_72c4d039.zip


CR Cristobal July 25, 2023 06:52 PM UTC

Hi,

It seems to be something with the format of the date. My OS and Excel are dd-MM-yyyy and the grid displays it in this format. I made added a string property that renders the date as a string. When I use the string property, the excel file works without an error. But if I keep the Property as DateOnly?, it exports the file properly, yet Excel presents this error.

I could not upload a video here. Tried .mov and .mp4 and I got "File type not allowed".

Here is how I see the grid:


Here a picture of the error when opening it in Excel:



I hope this helps.

Cristobal.



SP Sarveswaran Palani Syncfusion Team July 27, 2023 03:52 AM UTC

Hi Cristobal,


We have considered it as a bug and logged an issue “DateOnly Column with Format Property Causes Error During Excel Export” for the same. Thank you for taking the time to report this issue and helping us to improve our product. At Syncfusion, we are committed to fix all validated defects (subject to technological feasibility and Product Development Life Cycle) and this fix will be included in our upcoming patch release.


You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.


https://www.syncfusion.com/feedback/45646/dateonly-column-with-format-property-causes-error-during-excel-export


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization”


Until then we appreciate your patience.


Regards,

Sarvesh



CR Cristobal July 27, 2023 06:03 PM UTC

Hi,

Thank you for taking care of this issue.

I am happy to have helped you in improving the already excellent product you have.

Cheers,

Cristobal.



SP Sarveswaran Palani Syncfusion Team August 11, 2023 05:04 AM UTC

Hi Cristobal,


We are glad to announce that, we have included the fix for the issue “DateOnly Column with Format Property Causes Error During Excel Export” in our latest patch release.  So please upgrade to our latest version of the Syncfusion package to resolve the reported issue.


NuGet: https://www.nuget.org/packages/Syncfusion.Blazor.Grid


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 


Regards,

Sarvesh


Loader.
Up arrow icon