Problems setting width of data series

Hi Aspose!

I’m having difficulties setting the width of a data series in a Chart.
I’m using the following code:
Line border = series.getBorder();

This does however not work as I expected. I’m currently using Aspose 18.12 for Java. The following screenshot is from Excel which displays that the width is 3 (and not 4 as requested).
snip.png (10.4 KB)

Setting width to 2 works, but setting decimals (e.g. 2.5) doesn’t work at all. I might be doing this wrong, so I’m hoping you can guide me.

Kind regards


Thanks for the code segment and screenshot.

Please try using our latest version/fix: Aspose.Cells for Java v19.7.x.

If you still find the issue with v19.7.x, kindly provide your template file (containing the chart) and complete sample code (runnable) to reproduce the issue, we will check it soon.

Hi Amjad Sahi

You can close the inquiry in that case. The license prevents me from upgrading. I just figured that it was me and not the code that was wrong in this case, as I can see the issue has persisted in all 17.x and 18.x versions.


Alright, and good to know that you have sorted it out. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Hi Amjad

Just for the record. I didn’t sort it out. I can’t upgrade as the license has expired, and I was unable to find an example on how to set the width for a line in a chart.

Kind regards,


Your code segment looks ok to me. We are very sorry but we cannot evaluate issues using older versions. The fixes are based on latest APIs set only. If you want us to evaluate the issue, do provide us the resource files and code but we will still evaluate it using latest version/fix. If we found any issue with latest version/fix, we will log a ticket and figure it out and may provide a fix (if appropriate) for it.

Hi Amjad

I found the problem. The file was saved in an old XLS format. Changing it to XLSX did the trick.

It was actually during the fabrication of a working example for you that lead the to the answer, as I used one of your examples to get started. This one had the same problem as it also produces XLS files in the old format. You might consider updating the example to XLSX so it works better with modern Excel versions.

The example was found here:

Thanks helping out.

Kind regards


Good to know that you have figured it out by upgrading to XLSX file format.

Thanks for your suggestion, we will check and might change/use newer format (e.g XLSX) for certain demos (if possible).