Use aspose. Cells to save a worksheet as a different PDF File

Source: Internet
Author: User

From: http://www.evget.com/zh-CN/Info/catalog/18041.html

Aspose. Cells supports converting XLS files (including images and charts) into PDF files. Aspose. cells can work independently to convert workbooks into PDF documents. You do not need to use aspose. pdf for conversion. This conversion process does not need to create or use any temporary files. The entire process is completed in the memory.

If you need to save each worksheet in the template Excel file to generate different PDF files. This method can be used easily. You can also decide the worksheet to be displayed based on the PDF file to be rendered. Other worksheets will be hidden.

The following is an example:

[Java]

 // get the Excel file pathstring filepath = "F:/shak-data-RW/downloads/source.xlsx "; // instantiage a new workbook and open the Excel // file from its locationworkbook workbook = new Workbook (filepath); // get the count of the worksheets in the workbookint sheetcount = workbook. getworksheets (). getcount (); // make all sheets invisible tables t first worksheetfor (INT I = 1; I 
  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.