Thank you for the quick reply.
I still get the same exception. I even created a new class, replaced my code with yours. Still the same. I'm using Java 1.5 version and Aspose.CellsV2.1.2.9. Is there any other jar file I need to use.
Exception in thread "main" java.lang.NoSuchMethodError: com.aspose.a.c.a.a(Lcom/aspose/cells/Chart;)Z
at com.aspose.cells.Chart.toImage(Unknown Source)
at com.aspose.cells.cR.a(Unknown Source)
at com.aspose.cells.cR.a(Unknown Source)
at com.aspose.cells.cR.a(Unknown Source)
at com.aspose.cells.cR.c(Unknown Source)
at com.aspose.cells.cR.b(Unknown Source)
at com.aspose.cells.cR.c(Unknown Source)
at com.aspose.cells.cR.b(Unknown Source)
at com.aspose.cells.cR.a(Unknown Source)
at com.aspose.cells.cR.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.nielsen.claritas.poc.AsposePdfNew.main(AsposePdfNew.java:23)
public static void main(String[] args) throws IOException {
//Instantiate the Workbook object
Workbook workbook = new Workbook();
workbook.open("C:\\temp\\aspose\\template.xlsx");
//Save the document in Aspose.Pdf.Xml format
workbook.save("c:\\temp\\aspose\\MySpreadsheetn.xml", FileFormatType.ASPOSE_PDF);
//Bind the XML file (containing spreadsheet data) with the Pdf object
Pdf pdf = new Pdf();
pdf.bindXML("c:\\temp\\aspose\\MySpreadsheetn.xml", null);
//Create the PDF document by calling its save method
pdf.save("c:\\temp\\aspose\\MyPdfn.pdf");
}