当前位置:网站首页>Use aspese Cells convert Excel to PDF
Use aspese Cells convert Excel to PDF
2022-06-27 09:34:00 【Sparkle_ wsl】
Use Aspose.cells take Excel Turn into PDF
Source document address
https://blog.csdn.net/dxyzhbb/article/details/90408092
download jar package
link :https://pan.baidu.com/s/1QbhZ-6qmG1N-n6BoF3yZTQ
Extraction code :npdy
Add to your own mvn Warehouse
mvn install:install-file -Dfile="jar Bag location " -DgroupId="groupId" -DartifactId="artifactId" -Dversion=" edition " -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true
Guide pack
<!-- take excel Turn into pdf( Own packaging method )-->
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-cells</artifactId>
<version>8.5.2</version>
</dependency>
Code
@Test
public void excelToPdf() throws Exception {
// Remove watermark
String licenseXml = "<License><Data><Products><Product>Aspose.Total for Java</Product><Product>Aspose.Words for Java</Product></Products><EditionType>Enterprise</EditionType><SubscriptionExpiry>20991231</SubscriptionExpiry><LicenseExpiry>20991231</LicenseExpiry><SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber></Data><Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature></License>";
ByteArrayInputStream is = new ByteArrayInputStream(licenseXml.getBytes());
com.aspose.cells.License license = new com.aspose.cel` Insert a code chip here `ls.License();
license.setLicense(is);
// establish Workbook object
Workbook workbook = new Workbook("C:\\Users\\wucn\\Desktop\\work\\OA\\ test .xls");
// Save as pdf
workbook.save("C:\\Users\\wucn\\Desktop\\work\\OA\\ test .xls.pdf", com.aspose.cells.SaveFormat.PDF);
}
边栏推荐
- unity--newtonsoft.json解析
- Rman-08137 main library failed to delete archive file
- [MySQL basic] general syntax 1
- Pakistani security forces killed 7 terrorists in anti-terrorism operation
- Obsidian 一周使用心得(配置、主题和插件)
- js 所有的网络请求方式
- The markdown plug-in of the browser cannot display the picture
- Some considerations on operation / method overloading for thread to release lock resources
- Flow chart of Alipay wechat payment business
- Use CAS to complete concurrent operations with atomic variables
猜你喜欢

Understand neural network structure and optimization methods

有关二叉树的一些练习题

Nosql 数据库 -Redis 安装

Five page Jump methods for wechat applet learning

prometheus告警流程及相关时间参数说明

Object含有Copy方法?

【生动理解】深度学习中常用的各项评价指标含义TP、FP、TN、FN、IoU、Accuracy

How do I get the STW (pause) time of a GC (garbage collector)?

ucore lab5

初步认识pytorch
随机推荐
E+H二次表维修PH变送器二次显示仪修理CPM253-MR0005
Freemarker
A classic interview question covering 4 hot topics
【mysql篇-基础篇】通用语法1
Principle and application of the most complete H-bridge motor drive module L298N
提高效率 Or 增加成本,开发人员应如何理解结对编程?
Some exercises about binary tree
我大抵是卷上瘾了,横竖睡不着!竟让一个Bug,搞我两次!
Collection framework generic LinkedList TreeSet
Several cases that do not initialize classes
ucore lab4
1098 Insertion or Heap Sort(堆排序解释)(PAT甲级)
QT运行显示 This application failed to start because it could not find or load the Qt platform plugin
队列,双向队列,及其运用
MySQL proficient-01 addition, deletion and modification
如何获取GC(垃圾回收器)的STW(暂停)时间?
std::memory_ order_ seq_ CST memory order
Video file too large? Use ffmpeg to compress it losslessly
Imx8qxp DMA resources and usage (unfinished)
BufferedWriter 和 BufferedReader 的使用