Hi @MarkTheirl
This is possible but by using an Excel VBA macro that will open your Excel and save sheets as individual PDFs. Then call this macro from PAD.
Or you can write a vbscript, and then in PAD use "Run a vbscript" action.
You will find tons of code on the web regarding the same.
Here is a Vbscript to save individual sheets as separate PDFs.
Put the below in Run Vbscript action and change the path variables.
Dim objExcel, objWorkbook, ExcelFilePath, PathToSave
ExcelFilePath = "C:\Test\Source Excel.xlsx"
PathToSave = "C:\Test\"
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open (ExcelFilePath,True)
For i = 1 To objWorkbook.Sheets.Count
set ws = objWorkbook.Sheets(i)
ws.ExportAsFixedFormat xlTypePDF, PathToSave & ws.Name & ".pdf"
Next
objWorkbook.close
You would need to add extra code if you need to:
- Add print margins, set print area, etc
- Exit the excel application
- Use PAD variables inside of the vbscript