Click here to Skip to main content
14,699,224 members
Please Sign up or sign in to vote.
4.00/5 (3 votes)
I have table in sqlserver having around 80 to 90 columns and it has data around 800000 to 900000, i need to export data around 400000 to excel using asp.net and c#.

I have tried to export data from dataset using Open-XML DOM method, but it will hangup the system and got Memory Out of Bound error at some point.

can any other method which will export data from sqlserver to Microsoft excel 2007/2010, can OpenXML sdk is capable to export large amount of data to excel, any tutorial or example will help a lot.
Posted

1 solution

You need to break your data down into smaller sets. See http://office.microsoft.com/en-gb/excel-help/excel-specifications-and-limits-HP005199291.aspx[^] for size limits of Excel.
   
Comments
Tejas Vaishnav 11-Feb-14 9:21am
   
Excel 2007 and 2010 is having higher row limit then 400000, that's why i have mention in my question that, i need to export into Excel 2007/2010.
Richard MacCutchan 11-Feb-14 10:40am
   
You are correct, I missed that point. However, unless you provide considerably more details in your question, it is unlikely that anyone can offer any more useful suggestions.

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