We’ve hit an issue importing an Excel file into GridJS, getting the error message “Row or column is out of the range” with the following stack trace:
Aspose.Cells.Workbook.Save(string fileName, Aspose.Cells.SaveOptions saveOptions) in :0
Aspose.Cells.Workbook.Save(string fileName, Aspose.Cells.SaveFormat saveFormat) in :0
.(string , Aspose.Cells.Workbook , Aspose.Cells.SaveFormat ) in :0
.(string , Aspose.Cells.Workbook , ) in :0
.(string , Aspose.Cells.Workbook , , string ) in :0
Aspose.Cells.GridJs.GridJsWorkbook.(string , string , string ) in :0
Aspose.Cells.GridJs.GridJsWorkbook.ImportExcelFile(string uid, Aspose.Cells.Workbook wb) in :0
Program.<Main>$.__ConvertFile|0_0(Options o) Line 105 in /path/to/Converter.cs:105
CommandLine.ParserResultExtensions.WithParsed<Options>(CommandLine.ParserResult<Options> result, System.Action<Options> action) in :0
Program.<Main>$(string[] args) Line 218 in /path/to/Converter.cs:218
[Native to Managed Transition] in :0
The file opens fine in Excel, and the Aspose PDF conversion works, so it seems to just be an issue with GridJS. I’ve tried 23.7.0 and 23.8.0, both get the same error.
Any idea what could be causing this? Unfortunately we can’t share the file, but happy to go back and look for more information that could help with debugging.
@jrf.att
In general, GridJs works fine for files. So, it is related with the specific file. We need to investigate the structure of the file. Can you provide the file without privacy and important Information, etc.? Try to reduce the file with less info in this file, which can still reproduce this issue.
@peter.zhou I will try and get a minimal reproduction of the error, but is the first time we’ve seen this particular message so it might be hard to do.
Does the stack trace given any hints as to what is causing the “Row or column is out of the range” error? Does GridJsWorkbook.ImportExcelFile modify the passed-in workbook in any way?
@jrf.att
After importing the file, It will do a workbook.save to cache. “Row or column is out of the range” means while parsing the workbook, we meet some unusual structure. So, we need to get the file and investigate it. It is not general case.
Small update: I’ve found that the file works fine with 23.4.0, but doesn’t work with versions 23.5.0 and newer. I’ve also confirmed it’s not related to GridJS, as you hinted above. Simply doing the following is enough to reproduce the error in our environment:
Workbook workbook = new Workbook(source);
OoxmlSaveOptions ooxmlSaveOptions = new OoxmlSaveOptions();
workbook.Save(Path.Combine(outputDir, $"out.xlsx"), ooxmlSaveOptions);
Looking at the release notes for 23.5.0, I noticed “support to update external references of external sheet data to the local sheet of current workbook”, which might be related. When opening the file in Excel, I get a message “This workbook contains links to one or more external sources that could be unsafe.” The files referenced are not available (refer to some network drive).
Would this cause “Row or column is out of the range”?
I’ve just managed to get a minimal repro with customer information removed. It actually seems to be related to the chart, not external links. File is: repro.xlsx.zip (11.2 KB)
If I remove the chart, or downgrade to 23.4.0, I no longer get the error.
@jrf.att
By using sample files for testing, we can reproduce the issue. An exception occurred while resaving the file.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-54208
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The issues you have found earlier (filed as CELLSNET-54208) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi