Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1225
Error exporting to excel 2007 format (Excel found unreadable content)
posted

I am using 2009.1 and for whatever reason I keep getting that error. There will be 975,170 rows to be exported.  I am using the below call and the file saves correctly and is about 60MB, but if I try to open it I get that error and if I say Ok to repair it truncates all the data past the Excel 2003 limit of 65,536 rows.  Any ideas?

string sFilename = ("D:\\BUILDS\\ProjectDumps\\overall.xlsx");
ultraGridExcelExporter1.Export(ultraGrid1,sFilename,WorkbookFormat.Excel2007);

Parents
No Data
Reply
  • 12773
    Verified Answer
    posted

    Hello ,

    The problem you notice is caused by Excel 2003 rows limitation, he can’t open file with more rows. If you are using excel 2003 file format and you are opening it in 2003 there is limitation by the MS Excel to 65,536 rows. In your case you are trying to export file of Excel 2007 format that has bigger limitation and you are opening it in MS Excel 2003 so you will reach this limitation of the 2003 excel format, and the file will be truncated. If you want to open the exported files in Excel 2007 that is the file format you are using the file will be open correctly.  If you want to support only Excel 2003, and you are trying to export bigger amount of data you have two options during the export process: to throw exception if the data is bigger than the supported file format, or just to truncate the data :

                ultraGridExcelExporter1.FileLimitBehaviour = Infragistics.Win.UltraWinGrid.ExcelExport.FileLimitBehaviour.TruncateData;

    Let me know if that helps.

    Sincerely,
    Dimi
    Developer Support Engineer
    Infragistics, Inc.

Children