Could Not Find Method "add(com.aspose.slides.ChartDataCell)" on Class "class com.aspose.slides.ChartCategoryCollection"

Hi ,

I am facing the below issue when I try to do

shape.getChartData().getCategories().add(wb.getCell(0,1, ele.name));

Could not find method “add(com.aspose.slides.ChartDataCell)” on class “class com.aspose.slides.ChartCategoryCollection”
Error: Could not find method “add(com.aspose.slides.ChartDataCell)” on class “class com.aspose.slides.ChartCategoryCollection”. Possible matches:
public final com.aspose.slides.IChartCategory com.aspose.slides.ChartCategoryCollection.add(java.lang.Object)
public final com.aspose.slides.IChartCategory com.aspose.slides.ChartCategoryCollection.add(com.aspose.slides.IChartDataCell).

Have attached the screen shot of error thrown by node is also attached.
kindly do the needful.

image.png (44.6 KB)

@arun08,
Thank you for contacting support.

We are sorry that you have to encounter this problem. Please share the following additional information:

  • OS version on which the code was executed
  • Node.js version you used
  • Java version installed on the OS
  • Aspose.Slides version you used

@andrey.potapov

  • OS version on which the code was executed - windows 10
  • Node.js version you used - 18.20.4
  • Java version installed on the OS - 1.8.0_202
  • Aspose.Slides version you used - 24.3.0

@arun08,
Thank you for the additional information. I am working on the issue and will get back to you soon.

1 Like

@arun08,
Unfortunately, I was unable to reproduce the error you described. The ChartCategoryCollection class contains the method add(com.aspose.slides.ChartDataCell). Please check whether the Aspose.Slides for Node.js is correctly installed and try to isolate the problem.

It seems like, re-installing the node modules fixed the problem. thanks @andrey.potapov

@arun08,
We are glad that the issue has been resolved on your end. Thank you for using Aspose.Slides.