当前位置:网站首页>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);
}
边栏推荐
- Nosql 数据库 -Redis 安装
- Prometheus alarm process and related time parameter description
- 1098 insertion or heap sort (PAT class a)
- 队列,双向队列,及其运用
- 多个类的设计
- The background prompt module for accessing fastadmin after installation does not exist
- Unity - - newtonsoft. Analyse json
- Source insight 工具安装及使用方法
- 文件名设置导致writelines写入报错:OSError: [Errno 22] Invalid argument
- es 根据索引名称和索引字段更新值
猜你喜欢

Nosql 数据库 -Redis 安装
![文件名设置导致writelines写入报错:OSError: [Errno 22] Invalid argument](/img/08/2d4f425e6941af35616911672b6fed.png)
文件名设置导致writelines写入报错:OSError: [Errno 22] Invalid argument

this,构造器,静态,之间调用,必须搞懂啊!

Obsidian 一周使用心得(配置、主题和插件)

ucore lab3

Hitek power supply maintenance X-ray machine high voltage generator maintenance xr150-603-02

Installation and use of SVN version controller

This application failed to start because it could not find or load the QT platform plugin

Win10 add right-click menu for any file

I'm almost addicted to it. I can't sleep! Let a bug fuck me twice!
随机推荐
Understand neural network structure and optimization methods
Only one ConfirmCallback is supported by each RabbitTemplate 解决办法
I'm almost addicted to it. I can't sleep! Let a bug fuck me twice!
多個類的設計
vector::data() 指针使用细节
Quelques exercices sur les arbres binaires
JS 文件上传下载
ucore lab5
强化学习中好奇心机制
MySQL proficient-01 addition, deletion and modification
我大抵是卷上瘾了,横竖睡不着!竟让一个Bug,搞我两次!
QT运行显示 This application failed to start because it could not find or load the Qt platform plugin
Installation and usage of source insight tool
ucore lab3
DV scroll board width of datav rotation table component
了解神经网络结构和优化方法
See how much volatile you know
js 所有的网络请求方式
Brief introduction to SSL encryption process
隐私计算FATE-离线预测