当前位置:   article > 正文

Aspose excel转pdf_java采用aspose将excel转为pdf

java采用aspose将excel转为pdf
  1. //多个sheet
  2. String path = "C:\\Users\\Administrator\\Desktop\\999\\5\\a.xlsx";
  3. String path2 = "C:\\Users\\Administrator\\Desktop\\999\\5\\aaa.pdf";
  4. Workbook wb = new com.aspose.cells.Workbook(path);
  5. PdfSaveOptions options = new PdfSaveOptions();
  6. options.setAllColumnsInOnePagePerSheet(true);
  7. options.setOnePagePerSheet(true);
  8. wb.save(path2,options);
  9. wb.dispose();
  10. System.out.println("finish");
  11. //单独
  12. workbook.save(path2 , SaveFormat.PDF);

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/69531
推荐阅读
相关标签
  

闽ICP备14008679号