We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid Excel Export issues

Hello,

I have two issues with the Excel export of a Grid:
  1. When I call the method grid.ExcelExport() I got the Blazor message "attempt to reconnect to the server", download starts and after some seconds it reconnects to the server.
  2. When I open the downloaded file, Excel (16.0.12231) throws the message "There was a problem with part of the file content. Try to recover the content?" (translated to English). I choose yes, then Excel opens the file and it see complete. It says the repaired part is something like /xl/styles.xml (Styles).
I'm on 17.3.0.27.

Thank you

17 Replies

RS Renjith Singh Rajendran Syncfusion Team November 14, 2019 12:44 PM UTC

Hi Fabrizio, 

Thanks for contacting Syncfusion support. 

We tried to reproduce the reported problem by creating a sample to perform excel exporting with our latest version(17.3.0.27). But we are not able to reproduce the reported problem. The exporting works fine from our side. We are attaching the sample for your convenience, please download the sample from the link below, 

We need more details to further proceed on this and provide you a solution as early as possible, kindly share with us the following details for better assistance, 
  1. Share the sample which you have tried from your side, or reproduce the problem with the attached sample and share with us.
  2. Are you having template column or contain any anchor tag in Grid. And also share the total number of records bound to Grid.
  3. Share the video demo showing the problem.
  4. Share the exported excel file.
  5. Share your full Grid code.
  6. Share the details about the type of application you are using.(Blazor WebAssembly Client or Blazor Server Side)

And also we suspect that, you may be facing issue with serializing large data. In these scenario, you can increase the buffer size by including the below highlighted line into your Startup.cs file. 

[Startup.cs] 
 
        public void ConfigureServices(IServiceCollection services) 
        { 
            services.AddRazorPages(); 
            services.AddServerSideBlazor(); 
            services.AddSignalR(e => 
            { 
                e.MaximumReceiveMessageSize = 102400000; 
            }); 
        } 
 

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 



FA Fabrizio Alessandro November 14, 2019 05:39 PM UTC

Adding the highlighted code to Startup.cs makes all working!

services.AddSignalR(e => 
{ 
     e.MaximumReceiveMessageSize = 102400000; 
}); 

Thank you!


VN Vignesh Natarajan Syncfusion Team November 15, 2019 03:56 AM UTC

Hi Fabrizio,  

Thanks for the update.  

We are glad to hear that you query has been resolved by our solution.  

Please get back to us if you have further queries.  

Regards, 
Vignesh Natarajan. 



UN Unknown December 10, 2020 11:43 AM UTC

I have been seeing #2 ("There was a problem with part of the file content. Try to recover the content?" when opening the exported Excel file) in Syncfusion Blazor for several versions. I came across this discussion from a year ago and thought best to send in what I am seeing now on version 18.3.0.53. We are seeing that error message on every export from the Blazor SfGrid to Excel when opening the file.

I downloaded the code originally attached by Renjith on 11/14/2019 and ran it without any modifications and it successfully exported and opened without that message of needing to recover. However, that's using a much older version of Syncfusion Blazor that was a prerelease. When I updated to the newest Syncfusion Blazor nuget package (18.3.0.53), and made any changes that were necessary to build, the export to Excel would open the file with that message about recovery. I then tried to add in 
            services.AddSignalR(e => 
            { 
                e.MaximumReceiveMessageSize = 102400000; 
            });  
to the Startup.cs as outlined in https://www.syncfusion.com/forums/149077/grid-excel-export-issues . However, it did not have any impact, the exported Excel file still  returned the same message of recovery when opening.  I have attached my edited version with this post.

Are there any suggestions of how to avoid these issues with exporting to Excel or is this a problem that needs to be addressed in the Syncfusion Blazor library?

Attachment: BlazorAppGridIssues_a2775937.zip


VN Vignesh Natarajan Syncfusion Team December 11, 2020 05:19 AM UTC

Hi Timothy,  
 
Thanks for contacting Syncfusion support.  
 
Query: “ However, it did not have any impact, the exported Excel file still  returned the same message of recovery when opening.  I have attached my edited version with this post. 
 
We have analyzed the reported issue by exporting the grid data to excel format in the provided sample. We are able to open the excel file without the warning message and also we have ensured the reported issue by clearing the Nuget cache and using 18.3.0.53 (Syncfusion.Blazor) Nuget package. So kindly ensure the reported issue by clearing the browser and Nuget cache.  
 
If you are still facing the reported issue. Kindly share the following details to validate further at our end.  
 
  1. If you are opening in Microsoft Excel. Share the Microsoft Office version.
  2. Share the screenshot of warning along with video demonstration.
  3. Share the downloaded excel file you are facing warning message while opening.
  4. Share more details about the issue.
 
Above requested details will be helpful for us to validate the reported query at our end and provide solution as early as possible.  
 
Regards, 
Vignesh Natarajan 



UN Unknown December 17, 2020 03:03 PM UTC

Hi Vignesh Natarajan,

Thank you for your reply. I tried clearing the Nuget cache and browser cache, deleted the bin and obj folders, then reopened the solution and rebuilt and debugged, but still received the error messages.

I have attached a zip file with the source code, the Excel file example from the export, video of the process, and screenshot after enabling saving in Excel.

We are using Office 2016 64 bit.

Using Visual Studio 2019 -16.8.3

Please let me know if any additional details are needed.

Thank You,
Tim

Attachment: BlazorApp_20201217_e2b9acd9.zip


VN Vignesh Natarajan Syncfusion Team December 18, 2020 12:20 PM UTC

Hi Timothy,    
 
Thanks for sharing the requested details.  
 
Query: “then reopened the solution and rebuilt and debugged, but still received the error messages. 
 
We have considered the reported query as a bug and logged the defect report “Grid to Excel export generates corrupted Excel file in Office 2016” for the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our weekly release which is expected to be rolled out by end of December 2020.  
      
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.      
  
 
Till then we appreciate your patience.   
 
Regards, 
Vignesh Natarajan  
 
 
 
 
 
 
 
 
 
 



UN Unknown December 18, 2020 12:44 PM UTC

Hi Vignesh Natarajan,

Thank you for continuing to look into this and work to finding a solution for it.

The link you posted goes to Feedback for ASP.NET WEB FORMS, but this is happening in Blazor. I just want to confirm it will be addressed in Blazor.

Thank You,
Tim 


VN Vignesh Natarajan Syncfusion Team December 21, 2020 08:06 AM UTC

Hi Timothy,  

Sorry for the inconvenience caused.  

We have modified the Feedback to ASP.Net Core and resolving this issue will fix the issue reported in Blazor platform also.  

Regards, 
Vignesh Natarajan 



UN Unknown December 21, 2020 12:48 PM UTC

Excellent! Thank you for the clarification!

Thank you,
Tim


VN Vignesh Natarajan Syncfusion Team December 22, 2020 03:52 AM UTC

Hi Timothy,  

Thanks for the update.  

Kindly track the status of the issue using the below feedback 


Please get back to us if you have further queries.  

Regards, 
Vignesh Natarajan 



AL Aliea replied to Vignesh Natarajan December 30, 2020 04:21 PM UTC

Hi Timothy,  

Sorry for the inconvenience caused.  

We have modified the Feedback to ASP.Net Core and resolving this issue will fix the issue reported in Blazor platform also.  

Regards, 
Vignesh Natarajan 


We are experiencing this in the React grid component Excel exports as well.  Excel 2016. When opened Excel says every exported file is damaged and was repaired.

Can you confirm the React grid's Excel export will be included in this fix as well?


AG Ajith Govarthan Syncfusion Team December 31, 2020 12:07 PM UTC

Hi Aliea, 
 
Thanks for the update. 
 
Query: We are experiencing this in the React grid component Excel exports as well.  Excel 2016. When opened Excel says every exported file is damaged and was repaired. 
 
 We have checked your query and we have already logged a defect report for react platform also. So, we will include the fix in our next weekly patch release. 
 
Until then we appreciate your patience. 
 
Regards, 
Ajith G. 



UN Unknown January 12, 2021 03:24 PM UTC

Thank you to Syncfusion for resolving this issue. I downloaded the Nuget package for 18.4.0.34 for Blazor this morning and the Excel export from the grid did not produce the error message we had been seeing when opening the file.


VN Vignesh Natarajan Syncfusion Team January 13, 2021 04:18 AM UTC

Hi Timothy,  

Thanks for the update.  

We are glad to hear that your issue (warning message when trying to open a excel file exported from Blazor Grid in Microsoft Excel ) has been resolved.  

Please get back to us if you have further queries.  

Regards, 
Vignesh Natarajan 



AL Aliea January 15, 2021 02:02 PM UTC

We are still experiencing this issue with the React grid component version 18.4.34. I've attached screenshots of the recovering warning Excel 2016 is giving us and the repair summary Excel pops up.

Has this been corrected for React and if Syncfusion believes it has, how should we proceed in assisting?


Attachment: warning_36698db9.zip


AG Ajith Govarthan Syncfusion Team January 20, 2021 12:52 PM UTC

Hi Aliea, 
 
Thanks for the update. 
 
We have checked your query and prepared sample based, but we are not able to reproduce the reported issue at our end. For your convenience we have attached the sample so please refer the sample for your reference. 
 
 
If you still face the issue, then please share the below details to find the root cause of the issue. 
 
  1. If possible, please try to reproduce the issue in the attached sample or please try to share the issue reproducing sample.
 
  1. Share the steps to reproduce the issue along with file.
 
  1. Share the complete grid code example.
 
Regards, 
Ajith G. 


Loader.
Live Chat Icon For mobile
Up arrow icon