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

Free Support Forum - aspose.com

Problem in converting xllsx to pdf

import com.aspose.cells.FileFormatType; import com.aspose.cells.Workbook;

public class pdfcon {

public static void main(String[] args) throws Exception{

	
	
		
		
		Workbook work=new Workbook("E://upload_file/Book1.xlsx");
		work.save("Book1.PDF",FileFormatType.PDF);

System.out.print(“converted”);

}

}

this is my code sir…
i am using jdk 1.6 in ecllipsehelios…
& i put 5 jars
aspose-cells-7.4.3
bcprov-jdk16-1.46.jar
dom4j-1.6.1-sources.jar
jsr173_1.0_1api.jar
stax2-api-3.0.2.jar
woodstox-core-asl-4.1.1…

but i am getting this Exception…

Exception in thread “main” java.lang.NoClassDefFoundError: org/dom4j/Branch
at com.aspose.cells.mt.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)


Hi,


Seeing your exception and if you have set all the jars into your classpath, I think it looks multiple libraries of dom4j have been loaded by the server. Please check your server environment to make sure there is only one dom4j library that should be used.

Also, we recommend you to try our latest version/fix: Aspose.Cells for Java v7.5.2:
http://www.aspose.com/community/files/72/java-components/aspose.cells-for-java/entry489390.aspx

Also, please set the jars inside the “…\JDK 1.6\lib” folder at your installed or extracted directory for the new release. We did remove some of the inter dependencies jars like woodstox, stax2 and other jars from the release and have now written/included our own custom xml parser and to perform other xml operations in the product.

Thank you.