81Alpha
(Aaron)
June 2, 2020, 3:36pm
1
Using both paid Plumsail Forms & Documents to create an excel document. Everything is working as designed, however the business would like the ability to insert an image (jpg or png), is this currently possible?
I saw on another posting about formatting the template to {{signature}:picture}, which I tried using the attachment field in plumsail forms, but the output in the excel is System.Object[]
Thank You.
Luca1
(LucaNeedsYourHelp)
April 15, 2024, 8:42am
2
Do you know now how it works?
I need this!
Petr
(Petr Bushuev)
April 15, 2024, 12:00pm
3
Hi @Luca1 ,
You can insert an image into an Excel file using the picture formatter .
The picture formatter accepts either base64 code of the source picture or a public link.
In case of using with the Plumsail Forms, you can take the URL output and use it with the image token:
This is an example:
a Plumsail Form with the attachments field. Please make sure to name it the same way as the image token.
a Power Automate flow. It starts when the form is submitted and I use the URL output of the form to insert the picture.
Please give it a try.
Best regards,
Petr
Plumsail team
Luca1
(LucaNeedsYourHelp)
April 16, 2024, 6:22am
4
Thank you Petr!
But i use a normal MS Form. Is there also a way to implement that? I want the flow so easy as possible!
Petr
(Petr Bushuev)
April 16, 2024, 1:33pm
5
Hi @Luca1 ,
Actually, the source doesn't matter if you can pull a public link of the picture or the image content in base64 code.
I think with Plumsail Forms it's much easier to get the URL and insert pictures into a DOCX template.
Anyway, this is an example for MS Forms:
This is a Microsoft Form with image attachments:
This is a PA flow to insert an image into an excel template
I use this expression in the Start Document generation process with json action to get the base64 code from the OneDrive action.
base64(body('GetLogo'))
Even more complex case is inserting an array of images from an MS Form. This is an example for DOCX but it works the same for Excel:
And the DOCX template has a token like this one. I place the token in a table with one single invisible cell. So, each image from the array will reside in its own table cell.
{{images.image}:picture}
The flow gets all image attachments, append them into an array and pass the array into the DOCX template.
Please give it a try.
Best regards,
Petr
Plumsail team