C# 利用Aspose.Cells .dll將本地excel文檔轉化成pdf(完美破解版 無水印 無中文亂碼)


Aspose.Cells .dll下載  http://pan.baidu.com/s/1slRENLF並引用

C#代碼

 1 using System;
 2 using System.Collections.Generic;
 3 using System.ComponentModel;
 4 using System.Data;
 5 using System.Drawing;
 6 using System.Linq;
 7 using System.Text;
 8 using System.Windows.Forms;
 9 using Aspose.Cells;
10 
11 namespace exceltopdf
12 {
13     public partial class Form1 : Form
14     {
15         public Form1()
16         {
17             InitializeComponent();
18         }
19 
20         private void button1_Click(object sender, EventArgs e)
21         {
22 
23             //Create a new Workbook
24             //Open an Excel file
25             Workbook wb = new Workbook(@"E:\work\dll\officetopdf\file1\123.xls");
26 
27 
28             //Save the excel file to PDF format
29             wb.Save(@"E:\work\dll\officetopdf\file2\temp2.pdf", SaveFormat.Pdf);
30 
31         }
32     }
33 }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM