excel另存为pdf代码。
try
Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\test.xls")
'创建Excel文件对应的PDF文件
wb.ExportAsFixedFormat(MSExcel.XlFixedFormatType.xlTypePDF, "d:\test.pdf", MsExcel.XlFixedFormatQuality.xlQualityStandard, True, True, System.Reflection.Missing.Value, System.Reflection.Missing.Value, False, System.Reflection.Missing.Value)
app.quit
catch ex As exception
app.quit
End try
[此贴子已经被作者于2013-2-19 11:06:07编辑过]