I use ExportToXlsx to export gridview data to an excel file using the following code snippet
gridView.ExportToXlsx(fs,
new
GridViewDocumentExportOptions()
{
ShowColumnHeaders =
true
,
AutoFitColumnsWidth =
true
});
Sometimes when opening the file in Excel I get the error message:
Excel found unreadable content in ... Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes.
I can open the file after clicking yes, but the content is not in sync with the information as shown in the GridView.
It seems that this happens when the grid has empty cells e.g. we have a date field which can be omitted (null).
If I use the exportToPdf method al goes well using the same date in the gridview. So it seems it's an issue related to Excel export.
Is this a bug or otherwise how can I fix this issue?
I use version 2015.1.401.45
Regards,
Peter
9 Answers, 1 is accepted
We are aware of a such a problem and it is already resolved. The fix is included in the latest internal build.
Would you please try it and let me know how does it work for you?
Regards,
Dimitrina
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Hi Dimitrina,
Internal build 504 does indeed seem to solve the problem.
When can we expect the official release of this fix?
Thanks and regards,
Peter
I am glad to hear that. The next official version(Q2 2015) is scheduled to be released until the end of June.
Regards,
Dimitrina
Telerik
See What's Next in App Development. Register for TelerikNEXT.

I experienced similar problem:
var exportOptions = new GridViewDocumentExportOptions()
{
ExportDefaultStyles =true,
ShowColumnFooters = true,
ShowColumnHeaders = true,
ShowGroupFooters = true };
var tempFilename = @"c:\temp\telegridexport.xlsx";
using (FileStream steam = new FileStream(tempFilename, FileMode.CreateNew))
this.Quotes.ExportToXlsx(steam, exportOptions);
ExcelInstance.OpenExcelFile(tempFilename);
}
the grid have Column group in the grid. dll version: 2015.2.728.45
I get error like:
Excel found unreadable content in "telegridexport.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes
from excel log:
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error189520_04.xml</logFileName><summary>Errors were detected in file 'C:\temp\telegridexport.xlsx'</summary><repairedRecords summary="Following is a list of repairs:"><repairedRecord>Repaired Records: Cell information from /xl/worksheets/sheet1.xml part</repairedRecord></repairedRecords></recoveryLog>
As it turns out I could not reproduce any issue when exporting RadGridView with column groups locally.
Would it be possible for you to isolate the exact setup you have in a demo project and send it to us via a support ticket? That way we can debug it at our side and advice further.
Regards,
Dimitrina
Telerik

I am sorry to hear you still get an error even with the latest version. You can submit a support ticket through the ticketing system here.
Regards,
Dimitrina
Telerik

The version of my Reporting.dll is 11.0.17.406 (R1 2017 SP2). And I got the same warning message box from Excel when I export the report to XLSX format.
thanks,
Please refer to the following forum thread:
http://www.telerik.com/forums/xlsx-format-warning-message
where the same issue is discussed.
Regards,
Yana
Progress Telerik