I’m trying to get around some Excel row limitations. Here is the sample code I’m using:
Aspose.Cells.Workbook excel = new Aspose.Cells.Workbook();
string sSql = @" SELECT FieldName from Table"; //returns 2 million plus rows.
Aspose.Cells.Worksheet sheet = excel.Worksheets[0];
//…get sqlDataReader
sheet.Cells.ImportDataReader(sqlDataReader, true, 0, 0, false);
Aspose.Cells.TxtSaveOptions options = new Aspose.Cells.TxtSaveOptions();
options.Separator = Convert.ToChar("|");
excel.Save(“c:\temp\asposeoutput” + DateTime.Now.ToFileTimeUtc() + “.txt”, options);
The problem I’m having is that the output file is stopped after 1048576 rows as is limited by Excel.
Is there another ASPOSE way of taking a SQL query and putting it into a pipe delimited txt file when the number of rows exceeds the 1048576 mark (without breaking up the SQL query to do it in parts – not easily done in my case) ?
Thanks.