Question

2
Replies
1218
Views
WiltonT6 Member since 2018 2 posts
Accenture Brazil
Posted: 1 year ago
Last activity: 1 year 9 months ago
Closed
Solved

Encode a .xlsx file into Base64

Hello,

I am working in a user story which I need to convert a Page List into a .xlsx file. After that, I need to send this file as a Base64 string inside a connector.

I separated this user story in 3 steps:

  1. Call MSOGenerateExcelFile to generate the .xlsx file. - Done
  2. Use Base64Encode() function to convert the .xlsx into a Base64 string. - Doing
  3. Call the integration.

I did the first step successfully, but I don't know how to do the second step.

I saw in the bellow link that I can use this function to convert a Binary File into a Base64:

https://community.pega.com/sites/default/files/help_v719/procomhelpmain…

So, I was thinking to create a Binary File from the .xlsx that I have and call the Base64Encode() function to do this whole process, but I cannot figure out how to convert my file into a Binary File inside Pega.

Can someone give me hints to do that or maybe suggest another approach to create the Base64 string?

Thank You.

Witon S. Tuji.

Low-Code App Development
Moderation Team has archived post
Share this page LinkedIn