Greetings,
I am evaluating Aspose.Cells for Java and have just downloaded the library and am working on a simple test application which opens an exists XLSX file, makes a modification, and then saves with another file name.
Upon executing the following:
try {
LoadOptions loadOptions = new LoadOptions(FileFormatType.XLSX);
Workbook workbook = new Workbook(“D:\Work\test.xlsx”, loadOptions);
Worksheet worksheet = workbook.getWorksheets().get(0);
Cell cell = worksheet.getCells().get(“A1”);
cell.setValue(“Hiya!!!”);
workbook.save(“D:\Work\test2.xlsx”, FileFormatType.XLSX);
} catch (Exception ex) {
Logger.getLogger(MainBacking.class.getName()).log(Level.SEVERE, null, ex);
}
I receive the following exception upon executing the workbook constructor :
java.lang.ClassCastException: com.ctc.wstx.sr.ValidatingStreamReader cannot be cast to com.ctc.wstx.sr.ValidatingStreamReader
at com.aspose.cells.b.a.h.j.a(Unknown Source)
at com.aspose.cells.b.a.h.j.(Unknown Source)
at com.aspose.cells.b.a.h.j.(Unknown Source)
at com.aspose.cells.kw.a(Unknown Source)
at com.aspose.cells.kw.k(Unknown Source)
at com.aspose.cells.kw.a(Unknown Source)
at com.aspose.cells.kv.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at com.accuvant.testaspose.backing.MainBacking.testAspose(MainBacking.java:32)
I have included all of the jars in the library folder including woodstox-core-asl-4.1.1.jar.
I am running Java 1.6.
Any help would be appreciated.
ko
Hi,
Thank you for evaluating Aspose.Cells. From the stack trace, it seems there are conflicted implementations for "com.ctc.wstx.sr.ValidatingStreamReader". Please check all libraries used by your classpath to confirm there is no other library which contains "com.etc.wstx.**" except "woodstox-core-asl-4.1.1.jar". If you still get this issue, please send us your complete test project(including all jars and settings to run your application) so we can reproduce and trace the issue. If you are running your application in a webserver, please test your code with Aspose.Cells in a console program out of the server environment firstly to check whether it can work.
Thank you.
Hi,
Hi Carlos,
Hi Amjad,
Hi,