Convert XLS to PDF via Java
XLS to PDF Java conversion to convert single or multiple pages to PDF using On-premise Java library.
How to Convert XLS to PDF Using Java
In order to render XLS to PDF, we will use Aspose.Cells for Java API which is a feature-rich, powerful and easy to use conversion API for Java platform. You can download its latest version directly from Maven and install it within your Maven-based project by adding the following configurations to the pom.xml.
<repository> <id>AsposeJavaAPI</id> <name>Aspose Java API</name> <url>https://repository.aspose.com/repo/</url> </repository>
<dependency> <groupId>com.aspose</groupId> <artifactId>aspose-cells</artifactId> <version>version of aspose-cells API</version> <classifier>jdk17</classifier> </dependency>
Steps to Convert XLS to PDF via Java
Java developers can easily convert XLS file to PDF in just a few lines of code.
- Load XLS file with an instance of Workbook class
- Call Workbook.save method
- Pass output path with PDF extension as parameter
- Check specified path for resultant PDF file
Before running the Java conversion source code, make sure that you have the following prerequisites.
- Microsoft Windows or a compatible OS with Java Runtime Environment for JSP/JSF Application and Desktop Applications.
- Get latest version of Aspose.Cells for Java directly from Maven.
Java Spreadsheet Manipulation LibraryExcel API can be used to create, edit, convert and render Microsoft Excel formats to different formats. Moreover, it can be used for comprehensive charting, scalable reporting and reliable calculations within software applications. Aspose.Cells is a standalone API and it does not require any software like Microsoft or OpenOffice.
XLS What is XLS File Format
Files with XLS extension represent Excel Binary File Format. Such files can be created by Microsoft Excel as well as other similar spreadsheet programs such as OpenOffice Calc or Apple Numbers. File saved by Excel is known as Workbook where each workbook can have one or more worksheets. Data is stored and displayed to users in table format in worksheet and can span numeric values, text data, formulas, external data connections, images, and charts. Applications like Microsoft Excel lets you export workbook data to several different formats including PDF, CSV, XLSX, TXT, HTML, XPS, and several others. The XLS file format was replaced with a more open and structured format, XLSX, with the release of Microsoft Excel 2007. The latest versions still provide support for creating and reading XLS files, though XLSX is the first choice of use now.Read More
PDF What is PDF File Format
Portable Document Format (PDF) is a type of document created by Adobe back in 1990s. The purpose of this file format was to introduce a standard for representation of documents and other reference material in a format that is independent of application software, hardware as well as Operating System. The PDF file format has full capability to contain information like text, images, hyperlinks, form-fields, rich media, digital signatures, attachments, metadata, Geospatial features and 3D objects in it that can become as part of source document.Read More
Other Supported Conversions
You can also convert XLS into many other file formats including few listed below.