How to save excel file to pdf file?

Scenario: i need to save pdf file but of source excel file.

Steps to reproduce: read excel file and save to pdf

Current Behavior: any

Expected Behavior: pdf file saved

Studio/Robot/Orchestrator Version:

Last stable behavior:
Last stable version:
OS Version:
Others if Relevant: (workflow, logs, .net version, service pack, etc):

1 Like

You can replicate with using excel application scope by opening the relevant excel file
Then using hotkeys - File Save As - and change type to PDF.

1 Like

ok @TimK thank you for you suggestion, too i think same.

1 Like

You can try like this also
Convert Excel to word doc
Then word to PDF activity

1 Like

How to convert Excel to Word doc , If i need to install the any package in my Uistudio

1 Like

Thanks for the suggession.Could you please give me the indetail flow, it will be helpful for me.

1 Like

Hi can you explain the element to be used in the Sequence Container for saving an excel report to PDF.

1 Like

With your workbook you want to convert open it in excel (Excel Application Scope):

  • Then Send Hotkey - Alt + F

  • Then Send Hotkey - Alt + A

    • (This brings up the Save As Window)
  • Simply Type in the full filepath into the File name box.

  • Select Save as type as ‘PDF’

  • Then Send Hotkey - Enter

1 Like

@TimK or anyone - Hello, I’m stuck trying to follow your example above, as below. I can do the first three steps but I do not see a File name box. Where should it be? And where do I go to save as ‘PDF’

•Then Send Hotkey - Alt + F
•Then Send Hotkey - Alt + A
◦(This brings up the Save As Window)
•Simply Type in the full filepath into the File name box.
•Select Save as type as ‘PDF’
•Then Send Hotkey - Enter

Thank you for your help

1 Like

@mworth123 - the key presses are the same as when you open excel and click save as - (this brings up the save as window)

At the bottom there is a field called File Name - this is where you type into your full file path.

Then under neath that there is a Save as Type drop down selection field .

Hope that helps.

1 Like

@TimK - Thank you, where is the File Name box? Is it in UI Path or somewhere else? I’ve been using this program for just two months and I’m not a programmer. I didn’t expect you to reply given that your last reply on this thread was five years ago so I am trying this but it is erroring out on the Type Into activity


Can you tell me what I’m doing wrong?
Thanks again

1 Like

What you have looks correct however, remove the quotation marks from strAWB.
The file name field is what is in excel what you have already :slight_smile:

1 Like

@TimK - Thank you, I did that and it’s still erroring out on
2019-09-26_141034
I get a red box around it and the message is Click 'Tab Item Print" Faulted.
Also, I keep seeing a webpage appear that says InPrivate. I don’t know how Im getting that screen. I didn’t want it. How do I resolve these issues? I’ve attached the main if you need to see it Main.xaml (26.9 KB)

1 Like

Why are you clicking Print instead of Save As?

Does the webpage appear that says InPrivate when you do it ?

1 Like

@TimK - I’ve tried everything I can think of to get this working. I tried Save as and it didn’t work so now I’m trying to print and then save as PDF. I even tried using copy file and it worked great but all of the PDFs were corrupted. How do I stop that InPrivate from appearing?

Not sure if this is your answer but here goes:

When you save as PDF, Excel has a checkbox named “Open file after publishing”. If that is checked it will automatically open the saved PDF file with your default pdf viewer, which in your case i think is Microsoft Edge (as far as i know, InPrivate is Edge’s ‘incognito’ mode).

If this is your case, to prevent this behavior you need to go through the process manually. Save an excel file as PDF, uncheck “Open file after publishing” and click Save. Excel will remember the state of the checkbox in the future. You have to do this on every machine you run your workflow on.

Hope this helps,
Serban

I’ve had good success adding enter key to the name in Type Into:
“filename.pdf” + “[k(enter)]”

Thank you for this tip. It actually makes the process run a touch faster (than with an additional “click on the enter button” action.)

Much appreciated!

you can use Save Excel File As PDF Function inside of excel scope, use excel file
image

image