Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In having a data in a datatable.
im having 1 lakh record in the datatable.Im exporting that datatable to excel.
Its correctly importing.
But im geetiing 65000 records in first sheet and remaining 35000 records in second sheet.
my issue is that i have import all the 1 lakh records in same sheet and not and two sheets of the excel..can someone please give me sloution for this.

Im using this C# code..

C#
rvexam.Reset();
                            rvexam.Visible = true;
                            rvexam.LocalReport.ReportPath = Server.MapPath("~/PortalGUI/University/Reports/DFormReport.rdlc");
                            rvexam.Visible = true;
                            rvexam.LocalReport.DataSources.Clear();
                            Microsoft.Reporting.WebForms.ReportDataSource ordSub = new Microsoft.Reporting.WebForms.ReportDataSource("dsDform", dtDform);
                            Microsoft.Reporting.WebForms.ReportDataSource ordsUnivInfo = new Microsoft.Reporting.WebForms.ReportDataSource("dsUniv", dtUnivInfo);
                            rvexam.LocalReport.DataSources.Add(ordSub);
                            rvexam.LocalReport.DataSources.Add(ordsUnivInfo);
                            rvexam.LocalReport.Refresh();
                            mpereportViwer1.Show();
                            byte[] bytes = rvexam.LocalReport.Render("EXCEL"); // , null, out mimeType, out encoding, out extension, out streamIds, out warnings);
                            Response.Buffer = true;
                            Response.Clear();
                            Response.ContentType = "application/CSV";
                            Response.AddHeader("content-disposition", "attachment; filename=Dfrom.CSV");
                            Response.BinaryWrite(bytes); // create the file   
                            Response.Flush();


pls give me any alternate solution for this...
Posted

Which version(Excel) are you using?
Microsoft Excel 2003 - Worksheet size 65,536 rows by 256 columns

Check this post for more details
Excel specifications and limits[^]
 
Share this answer
 
Probably, you are using the wrong version of Excel: Excel 2003 was limited to 65,536 rows in any sheet: http://office.microsoft.com/en-gb/excel-help/excel-specifications-and-limits-HP005199291.aspx[^]
Try Excel 2007 or above - it allows more than 1,000,000 rows.
http://msdn.microsoft.com/en-us/library/ff700514.aspx#Office2007excelPerf_BigGridIncreasedLimitsExcel[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900