Dim App As New MSExcel.Application try Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("d:\test.xls") '创建Excel文件对应的PDF文件 wb.Saved = True wb.ExportAsFixedFormat(MSExcel.XlFixedFormatType.xlTypePDF, "d:\test.pdf", MsExcel.XlFixedFormatQuality.xlQualityStandard, True, False, System.Reflection.Missing.Value, System.Reflection.Missing.Value, True, System.Reflection.Missing.Value) app.quit catch ex As exception msgbox(ex.message) app.quit End try