UiPath Studio Web - Convert a PDF to XLSX (Google Sheets) and upload it to Drive

Hello dear community,

I am a user of Studio Web and sometimes via email I get an invoice in pdf format.
I want to convert it to XLSX and then upload it to Google Drive.
At present I have the following flow:

For Each Email → Download Email Attachments → For Each currentGmailAttachment → Export a PDF to Other Formats (Output Format XLSX) → Upload Files ( variable Export_PDF) and tick True on Google Workspace file type

And in this last variable “Export pdf” I get an error:

I will deeply appreciate help on the matter with some Expression Editor solution or other more general approach.

Thank you a lot, and happy automation !

@Ivo_Peshev

May I know what is the variable type of export_pdf…can you check and tell…

Also to verify try to do export_pdf. And if you see locaresource or so can use that

{export_pdf.LocalResource}

Cheers

Seems like exportPdf is the wrong type.

Hey Anil_G
From the data manager this is what I can see:

P.S.
The local Resource is the following error

Hi Silviu,
Thanks for jumping in. Do you have any ideas how can I make it the right type?

Cheers,
Ivo

@Ivo_Peshev

if you open advanced editor and do exportpdf. are you getting any suggestions?

Something like this?

also to know the exact type of variable…go to export pdf field…and open advanced editor on top it would display the type

cheers

I get the following:

@Ivo_Peshev

try giving {LocalResource.FromPath(exportpdf.location)}

better print exportpdf.location and check if it is proper location

cheers

Thanks again @Anil_G !

Here we are completely over my head, the output from {LocalResource.FromPath(exportpdf.location)} is:

UiPath.Platform.ResourceHandling.ILocalResource

1 Like

@Ivo_Peshev

so its working right?

cheers

@Anil_G unfortunately it is not working.

I found the solution, you need to add Download file (pdf) after the conversion and then Upload to G Drive.

Thank you all for the help @Anil_G !

2 Likes

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