package cn.yiyang.common.utils;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import com.aspose.cells.License;
import com.aspose.cells.PdfSaveOptions;
import com.aspose.cells.SaveFormat;
import com.aspose.cells.Workbook;
public class Excel2Pdf {
public static boolean getLicense() {
boolean result = false;
try {
InputStream is = Excel2Pdf.class.getClassLoader().getResourceAsStream("license.xml"); // license.xml应放在..\WebRoot\WEB-INF\classes路径下
License aposeLic = new License();
aposeLic.setLicense(is);
result = true;
}catch (Exception e) {
e.printStackTrace();
}
java使用Aspose-cells实现Excel转PDF
最新推荐文章于 2024-08-08 07:18:51 发布
本文详细介绍了如何使用Java编程语言结合Aspose.Cells库来将Excel文件高效地转换为PDF格式,包括关键步骤和示例代码,帮助开发者在项目中实现这一功能。
摘要由CSDN通过智能技术生成