当前位置:网站首页>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);
}
边栏推荐
- Conception de plusieurs classes
- Today's three interviews demo[integer ASCII class relationship]
- Use CAS to complete concurrent operations with atomic variables
- Principle and application of the most complete H-bridge motor drive module L298N
- Quartz(定时器)
- 多个类的设计
- 我大抵是卷上瘾了,横竖睡不着!竟让一个Bug,搞我两次!
- 10 常见网站安全攻击手段及防御方法
- 不容置疑,这是一个绝对精心制作的项目
- ucore lab5
猜你喜欢

C # solve the relative path problem using SQLite

Video file too large? Use ffmpeg to compress it losslessly

ucore lab3

Source insight 工具安装及使用方法

ucore lab5

Es update values based on Index Names and index fields

Process 0, process 1, process 2
Scientists develop two new methods to provide stronger security protection for intelligent devices

When multiple network devices exist, how to configure their Internet access priority?

ucore lab4
随机推荐
Static code block vs construction code block
i=i++;
10 常见网站安全攻击手段及防御方法
Object contains copy method?
Getting started with webrtc: 12 Rtendpoint and webrtcendpoint under kurento
Enumeration? Constructor? Interview demo
小白也能看懂的网络基础 03 | OSI 模型是如何工作的(经典强推)
Digital ic-1.9 understands the coding routine of state machine in communication protocol
Curiosity mechanism in reinforcement learning
初步认识pytorch
Summary of three basic interview questions
unity--newtonsoft.json解析
vector::data() 指针使用细节
[vivid understanding] the meanings of various evaluation indicators commonly used in deep learning TP, FP, TN, FN, IOU and accuracy
ucore lab5
Several cases that do not initialize classes
Some exercises about binary tree
有關二叉樹的一些練習題
See how much volatile you know
快速入门CherryPy(1)