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”.
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
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.
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.
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.
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.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.