cancel
Showing results for 
Search instead for 
Did you mean: 

Saving Excel file as PDF

JonathanHolstin
Level 5

Hello,
I have found a few videos on this topic and attempted to follow them but not having any luck.  Does anyone have any links to easy walk-throughs on this or is anyone willing to chat with me on how to accomplish this task.

Thanks,

Jon



------------------------------
Jonathan Holstine
Systems Accountant
Interior Business Center
America/Denver
------------------------------
27 REPLIES 27

Hi, Kumari,

if you do everything correctly - open excel with Blue Prism first, do your modifications and then call the action containing below code stage it MUST work I tested it.

Dim wb as Object = GetWorkbook(handle,workbookname)
Dim excel as Object = wb.Application
'For details, google XlFileFormat Enumeration
Dim xlTypePDF As Integer = 0

excel.DisplayAlerts = False

wb.activesheet.ExportAsFixedFormat (xlTypePDF, filename)

excel.DisplayAlerts = True

Regards,



------------------------------
Zdeněk Kabátek
Head of Professional Services
NEOOPS
http://www.neoops.com/
Europe/Prague
------------------------------

Thanks for your response .
i will try this code also but can you let me what is the input need to be provided .
if i am not wrong handle ,workbookname ,filename also need to be passed as input in object studio? if yes then it repersents which file name excel filename or after saving as pdf  what would be the name for pdf.
2)and please revert to the other query also that i have posted in this chain.

------------------------------
Kumari Yadav
------------------------------

Kumari, how well you know Blue Prism? Let me give you some hints:
1. you need to create a process
2. in process open excel file with standard business object actions
3. this makes handle data item and New Workbook Name data item which you will use in the code as input parameters. Filename is the target PDF name which can be anything you choose/define.
4. you can run this in loop and create many files with different names following some naming convention (you should define your filename in calculation stage).

Regards,

Zdenek

------------------------------
Zdeněk Kabátek
Head of Professional Services
NEOOPS
http://www.neoops.com/
Europe/Prague
------------------------------

1)Hey thanks for your help its working fine now. And yes actually i am little new to blue prism still in learning phase.
In above query actually my bad i just wanted to ask about file name anyways its okk now
2) still i have a query that if can we provide target path here that pdf should get save at a particular path
because for right now its taking document folder as default path but what if i want give a particular path?please reply.

------------------------------
Kumari Yadav
------------------------------

ewilson
Staff
Staff
FWIW - There's an updated version of the MS Excel VBO on the Digital Exchange that includes a Export as PDF action for exporting either an entire workbook or just the active worksheet as a PDF.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

thanks ,will check.

------------------------------
Kumari Yadav
------------------------------

MS Excel VBO- Enhanced ,right? in this i was getting error that -- dictionary key is not available.
anyways
can you tell me  one thing i will explain you the situation .......
i have an excel file and in this i need to find the unique customer name and after getting that customer name i need the whole row for that particular customer name 
because i need the details of that customer to perform other operation. i want that row to get into collection nd then perform other needed operation
But i don't want to use loop for getting unique customer name as its taking so much of tym ,actually i have around 200 to 300 data in excel so iterating each row is time taking. I have tried looping 20 rows nd perform all opearation , for this it took around 13 min.
Please guide me as soon as possible.

------------------------------
Kumari Yadav
------------------------------

Hi, Kumari,

the steps should be following:
1. Read everything from excel to BP Collection
2. Use the VBO attached to this thread where you can find an action Return Unique Rows. You need to specify two input parameters. Input collection in which you want to search for unique rows and collection containing names of columns to compare for uniqueness. It can be just one row or multiple rows. In Output Collection you should get unique rows only. 

There are some other actions you may find useful.

Regards,

------------------------------
Zdeněk Kabátek
Head of Professional Services
NEOOPS
http://www.neoops.com/
Europe/Prague
------------------------------

@Kumari Yadav,

No, not the Enhanced. Just the regular MS Excel VBO. See the following link.

https://digitalexchange.blueprism.com/dx/entry/3439/solution/ms-excel-vbo

It looks like Zdeněk has covered your other question.

Cheers,​

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Yes Thanks

------------------------------
Kumari Yadav
------------------------------