Exporting grid to excel generate blank 0 bytes corrupted excel files

Hello, I have an issue where i'm trying to export a grid  to excel.
My action gets fired in the controller and I can successfully go through these lines of code 
 
 var exp = new ExcelExport();
 var properties = (GridProperties)Syncfusion.JavaScript.Utils.DeserializeToModel(typeof(GridProperties), gridModel);
 
 var dataSource = new DataOperations().Execute(data, properties);

 exp.Export(properties, dataSource, fileName, ExcelVersion.Excel2016, false, false, "flat-saffron");


dataSource is populated with the exact same view model that is used to display in the grid.

When I press the excel icon, i get offered a file to download however it is a 0 bytes xlsx file that can't be opened.

Any common causes? 

1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team October 19, 2017 04:45 PM UTC

Hi Jonathan, 

Thanks for contacting Syncfusion Support. 

We have checked your query and we are unable to reproduce your reported problem at our end. We have prepared sample using Exporting which can be downloaded from the below location. 


Refer to the screenshot:- 
 

We need some additional information to find the cause of the issue. Could you please share us the following details to find the cause of the issue. 

1. Complete Grid code example(both in client side and server side). 

2. Screenshot/Video regarding the issue. 

3. If possible provide an issue reproducing sample or hosted link or replicate the issue in the above sample .  

4. Did you get the data Source for the Grid in the Network Tab as provided in the screenshot. Please share us the screenshot as like given above. 

5. Have you get the GridModel in the Excel Export method. How you bind the filename in export method. Please share the code.  
 
The provided details will helps us to analyze and provide you solution as early as possible.   

Regards, 

Farveen sulthana T 




Loader.
Up arrow icon