We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Trying to open an Open office calc(.ods) file But getting Following Error

I am trying to open an existing ods file using java but i am getting this error.

Here is My code:

import java.io.File;
import java.io.IOException;
import java.io.;
import com.aspose.cells.Workbook;
import com.aspose.cells.
import com.aspose.cells.Worksheet;

public class ReadODSaspose {
public static void main(String[] args) {

try {

//Instantiating a Workbook object

Workbook workbook = new Workbook();

//Creating a file stream containing the Excel file to be opened

FileInputStream fstream = new FileInputStream(“C:\data1.ods”);

//Opening the Excel file through the file stream
workbook.open(fstream, FileFormatType.ODS);
//Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.getWorksheets().getSheet(0);

//Closing the file stream to free all resources

} catch (IOException e) {
// TODO Auto-generated catch block
// Change date.


Error Msg:-

Exception in thread “main” java.lang.NoClassDefFoundError: com/aspose/cells/gD (
wrong name: com/aspose/cells/gd)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
at ReadODSaspose.main(ReadODSaspose.java:22)

Please Help me.


Please share your template ODS file and which version you are using?

We will check your issue soon.

Thank you.

Hi I am Using Openoffice 3.2.0 Version

Attached the data1.ods for your Reference I am Using the openoffice 3.2.0 Version.



Please follow up your other thread on the same subject.
Thank you.