>> >> string xlsfilename = ConfigurationManager.AppSettings["XLSFilesPath"] + "ps20180113.xls"; >> string pdffilename = ConfigurationManager.AppSettings["PDFFilesPath"] + "testps20180113.pdf"; >> >> Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.Interop.Excel.Application(); >> Microsoft.Office.Interop.Excel.Workbook wbv = excel.Workbooks.Open(xlsfilename); >> Microsoft.Office.Interop.Excel.Worksheet wx = excel.ActiveSheet as Microsoft.Office.Interop.Excel.Worksheet; >> if (File.Exists(pdffilename)) >> { >> File.Delete(pdffilename); >> } >> >> wbv.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF, pdffilename); >> >> >> wbv.Close(true, Type.Missing, Type.Missing); >> excel.Quit(); >>>>
oEx=createobject("excel.application") >oWb=oEx.Workbooks.Open(xlsfilename) >oSh=oEx.ActiveSheet >if File(pdffilename) > erase (pdffilename) >endif >oSh.ExportAsFixedFormat(oEx.XlFixedFormatType.xlTypePDF, pdffilename) >OWb.Close(0) >oEx.quit()>As for the special locations... I assume you have your own locations, or can find how to extract them from Excel or wherever they are defined.