Excel Upload using Aspose.Cells on JDK1.6

We had Aspose.Cells.jar in an upload feature of our application which was on jdk 5 and Jboss AS 4.

The application is now using jdk1.6 and moved on JBoss 6.

The older jar is not working on the new environment throwing ClassDefNotFound Exception.

Which version of Aspose should be used?

Please help.

Hi,

Please download the latest Aspose.Cells for Java from the following link and extract the JDK 1.6 Jar from the JDK 1.6 folder.

http://www.aspose.com/community/files/72/java-components/aspose.cells-for-java/entry350406.aspx

Thanks for your quick response Shakeel.

I extracted the jars from the lib folder and added to my project but compilation errors are coming.

Many features like workbook.open showing errors.

I have put all the jars which were there in the lib folder of aspose-cells-7.0.4-java.

Hi,

Actually, you need to upgrade code because you have been using older 2.5.x versions but now we have did major enhancements in 7.0.x versions.

Please visit this link for more information
http://www.aspose.com/community/files/72/java-components/aspose.cells-for-java/entry325010.aspx

To get the code example, you should also download:
Demos - Aspose.Cells for Java v7.0.0 And Later

Please also see this thread for more help.
Migration to Aspose.Cells 7 from Aspose.Cells 2.5.4.202

Ok.

I noticed there is no open method in the new version.

How to open a workbook?

Also. there os no XLS FileFormatType. How can I use it.

Also when I am running the file, its giving me the following error:

java.lang.NoClassDefFoundError: com/aspose/cells/eI (wrong name: com/aspose/cells/ei)

Code which is giving exception:

LoadOptions loadOptionXLSX = new LoadOptions(FileFormatType.XLSX);

workbook = new Workbook(fs, loadOptionXLSX);

Hi,

Please check the document for your reference:
http://www.aspose.com/documentation/java-components/aspose.cells-for-java/opening-files.html

Also, we recommend you to kindly refer to our online docs which is up-to-date for your complete reference:
http://www.aspose.com/documentation/java-components/aspose.cells-for-java/index.html

thank you.
For:

"Also when I am running the file, its giving me the following error:

java.lang.NoClassDefFoundError: com/aspose/cells/eI (wrong name: com/aspose/cells/ei)

Code which is giving exception:

LoadOptions loadOptionXLSX = new LoadOptions(FileFormatType.XLSX);

workbook = new Workbook(fs, loadOptionXLSX);"

Please use OoxmlSaveOptions API for XLSX, XLSM, XLSB formats etc., e.g

OoxmlSaveOptions opt = new OoxmlSaveOptions();

Hi,

In fact it is a bug of JBoss6.0 which cannot distinguish different classes that in different cases, such as class Tt.class and TT.class. You should upgrade your JBoss server, such as to 6.1 final which can work fine for such situations.