Aspose.Cells .dll下载 http://pan.baidu.com/s/1slRENLF并引用
C#代码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Aspose.Cells; namespace exceltopdf
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{ //Create a new Workbook
//Open an Excel file
Workbook wb = new Workbook(@"E:\work\dll\officetopdf\file1\123.xls"); //Save the excel file to PDF format
wb.Save(@"E:\work\dll\officetopdf\file2\temp2.pdf", SaveFormat.Pdf); }
}
}