Sparkline Limit

I have C# code that adds a Sparkline line chart to a cell in a worksheet. It does this for every row in the sheet. This code works until it hits row 16385, where it throws an error saying “Invalid column index”.

I’m aware that 16384 is the maximum number of columns an Excel sheet can hold, but this code isn’t trying to use that many columns.

Attached is a screenshot of the error, as well as the C# code snippet that creates the Sparkline. The code has an if statement that prevents the program from attempting to add a Sparkline past row 16384, if that is removed the error will happen on row 16385.
sparkline error.zip (68.8 KB)

@psweeney
Would you like to provide your sample file and executable Console project? We will check it soon.

@psweeney
We can reproduce the issue by testing it on the latest version v24.6 using the following sample code. Found invalid column index when adding Sparkline.

The sample code as follows:

Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets[0];
sheet.SparklineGroups.Add(SparklineType.Line, "A26385:C26385", false, CellArea.CreateCellArea("D26385", "D26385"));

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-56012

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.

If you have any questions, please provide your sample files and executable test code, and we will check it soon.

@psweeney
We are pleased to inform you that your issue (“CELLSNET-56012”) has been resolved. The fix will be included in an upcoming release (Aspose.Cells v24.7) . You will be notified when the next version is released.

That’s great! Thanks John and Simon.

@psweeney
You are welcome. If you have any questions, please feel free to contact us.

The issues you have found earlier (filed as CELLSNET-56012) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi