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);
Hello , That’s strange, I didn’t find any reason why you should get a error saying that you are over the Excel 2003 limitation, and you have file format excel 2007 and opened it excel 2007. Can you please give me the exact message you got when you open the file, to get more details about ?One more thing are you using the Infragistics3.Excel engine to generate your file and which version?I hope this helps.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
HI,
I am also experiencing the same issue. I have framework developed in .Net2.0 and Excel 2007. I cant open the file that has > 66,000 rows. In this, you guys discussed that we have two option. Either throwing error message or truncating the data. If i truncate the data and put it in worksheet1 and exporting remaining rows to Worksheet2 is possible? if yes how to do that?
Hello RMuthu,
RMuthu said: For what we need this method. private void ultraGridExcelExporter1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.ExcelExportInitializeRowEventArgs e) { //export the rows that should be include to the curent sheet if (!(curWorckseet * 65536 <= e.Row.Index && e.Row.Index <= curWorckseet * 65536 + 65536 +1)) { e.SkipRow = true; } } Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
For what we need this method.
private void ultraGridExcelExporter1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.ExcelExportInitializeRowEventArgs e) { //export the rows that should be include to the curent sheet if (!(curWorckseet * 65536 <= e.Row.Index && e.Row.Index <= curWorckseet * 65536 + 65536 +1)) { e.SkipRow = true; } }
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
This method is used to generate and export only the rows in range of current worksheet.
RMuthu said:I have CellExported event in my code. When i do this operation " e.CurrentWorksheet.Rows[e.CurrentRowIndex].Cells[e.CurrentColumnIndex].Value = date;" it throws me the error, saying too many rows when it reach beyond 65536 row index.
CellExport event will not work after the CurrentColumnIndex become out of the valid boundary. So you can use something like that to check for the valid rows.if (0 < e.CurrentRowIndex + headers && e.CurrentRowIndex + headers <= 65536) { e.CurrentWorksheet.Rows[e.CurrentRowIndex].Cells[3].Value = 9; }I have modified and enhance last sample with these suggestions and to support also header export. I hope this helps.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Also,
I have CellExported event in my code. When i do this operation " e.CurrentWorksheet.Rows[e.CurrentRowIndex].Cells[e.CurrentColumnIndex].Value = date;" it throws me the error, saying too many rows when it reach beyond 65536 row index. Please advise me.
Code works fine for me. THANKSSSSSS...........
Hello RMuthu, Since there are constantly lots of questions about this - how to export data form grid to Excel2003 and avoid the maximum rows limitation of the excel I have created a simple project showing how to create new sheet when the maximum rows was reached. I hope this is helpful.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Hi,
I'm not entirely sure, but I think what you could do is trap the events on the UltraGridExcelExporter like HeaderExporting and RowExporting and take a look at the CurrentRowIndex in each of these events. If the index starts to get too high, you could change the CurrentWorkSheet to a new worksheet in the excel workbook and set the CurrentRowIndex back to 0 to start at the top of the next worksheet.