How to set the value of Chart.Nseries.CategoryData with the columns more than 256

Hi ,
Below code is working fine.
Chart.NSeries.CategoryData = "B2:IV3"

I want to select more columns for the chart data, for example:
Chart.NSeries.CategoryData = "B2:JE3"
However, the value of Chart.NSeries.CategoryData is changed to “B2:I3” automatically.
So, could you please take a look at this issue, how to set the value of Chart.NSeries.CategoryData with the count of columns more than IV?
Thanks.

Hi,


"I want to select more columns for the chart data, for example:
Chart.NSeries.CategoryData = "B2:JE3""

Well, for your information, for an XLS (Excel 97-2003) file format, you cannot have more than 256 columns (last column is IV) in a worksheet, so it might not work for an XLS file format. I think you should use XLSX (Excel 2007/2010) file format which does not have this limitation as it does support to have many more columns in a single sheet.

Also, if you are creating a new workbook from the scratch and create your chart with setting category or values data, please use the line of code like following:

Workbook wb = new Workbook (FileFormatType.Xlsx);
//… Your code goes here


Thank you.

Hi,
This issue is fixed.
Thanks.

Hi,


Good to know that your issue is fixed.

Have a nice day!

Thank you.

May I add that you must set the series before updating CategoryData or it just won’t accept any value without series.

@Mihai_Bratulescu,

Yes, you should also add data series for the chart if you need to specify category data to make it work. 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.