Issue on Exporting Workbook with Worksheets Copied from Another Workbook to PDF

Hi Experts,

I’m working on a requirement to export select worksheets from a workbook into a PDF file. I cannot proceed via UI Automation as ‘Save Print Output As’ modal dialog is preventing the workflow from running unless it is interacted and relaunch accordingly.

With that, I implemented it via Invoke Code (C#) using the code from the attached file.
Invoke Code - Export Workbook to PDF.txt (5.5 KB)

Upon running the code, it logged that the worksheets have been copied but those were really not but no exception was thrown. The file was generated but it cannot be opened as it didn’t have pages.

Where could it possibly gone wrong?

Appreciate your feedback / input on this issue. Thank you so much!

Best regards,
Jay

@iamjaredm

Why mot use the activity

You can copy whole sheet as new workbook and use or specify start and end

Cheers

1 Like

Use below activity

Format of excel could be an issue while exporting to PDF. To see the page layout - use below option in excel and adjust the column size and template accordingly. Similar would be exported to PDF

Also you have the option to limit the number of pages in PDF using the properties

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.