Row Index Limit

Hi.

I’m trying to loop through a file with 1331807 rows, the MaxDataRow property is correctly set to 1331807, however when it hits row number 1048576 it throws an ArgumentException “Invalid row index”.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

It looks like you have hard coded this to match Excel row limit, but it would be nice if you remove this limitation, or at least make it optional.

Here is my code

Dim lOptions = New Aspose.Cells.TxtLoadOptions(Aspose.Cells.LoadFormat.TabDelimited)

lOptions.ConvertNumericData = False

Dim Excel As New Aspose.Cells.Workbook("C:\Users\....txt", lOptions)

Dim Sheet = Excel.Worksheets(0)

Dim LastRow = Sheet.Cells.MaxDataRow

Dim RowData As String

For Ix = 0 To LastRow - 1

RowData = Sheet.Cells(Ix, 0).StringValue

Next

Thanks

Hi,

Thanks for your reporting.

Please test your issue with the latest Aspose.Cells
for .NET v5.3.1.5
.

If the problem still occurs, then attach your input (txt) file here. We will look into it.

I tested with latest version, but still same issue.

attached is the file I'm working with.

Thanks

Hi,

We are able to reproduce your issue, so we have logged it in our Bug Tracking System under ID CELLSNET-25707 8.
We will soon get back to you on this.

Hi,

Well it’s the limitation of MS Excel 2007 that you cannot specify more than 1048576 rows. Anyways, We will look into it later on if we can do something for it.

Thank you.


This limitation makes sense when working with Excel files. But maybe you can change that when opening a text file it shouldn’t have this limitation.

Thanks

Hi,


Could you try our latest version/fix: v7.3.2.1: Aspose.Cells for .NET v7.3.2.1 and let us know your feedback.

Thank you.


Hi,

i have tested it with the latest version (8.1.1) and still get the error.

regards
Bernhard

Hi Bernhard,


Well, Aspose.Cells follows MS Excel standards and specifications. Could you provide us your template file (which we will open it into MS Excel to check on how MS Excel displays the file) and paste your sample code (runnable), we will check your issue soon.

Thank you.

Hi Amjad,

okay, then I have misunderstood the last message.
I hoped, in v7.3.2.1 the problem is fixed but if you only follow the excel standard then i have to write my own csv-reader.

regards
Bernhard

Hi Bernhard,

Well, I am afraid, we cannot fix the issue logged as “CELLSNET-25707 10” as we will always check this constraint for most of APIs that use row/column indexes. Also, for many operations we also need this check to make sure the operation can give correct results. So, we cannot support your requirement directly. However, as a workaround we think you can just split your CSV data by rows into multiple files and then read them one by one and process the data.

Thank you.