Question
Cognizant
IN
Last activity: 19 Apr 2018 15:18 EDT
How to convert the byte stream from Email/FileListener into File and Parse the content
I have a requirement, that I could get the Excel File as an attachment in the Email Listener and I need to parse the data from that Excel File. Could someone please help me to parse the Excel data and Copying it to clipboard.
-
Likes (1)
Praveen Barasker -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
EPAM Systems, Inc.
ES
Hi Govindarajan,
Thanks for posting on PSC.
- Parse Excel File With Example.
- https://collaborate.pega.com/question/how-parse-excel-file-which-separated-cells
Hope it helps, kindly notify if it does by marking this post as answered for larger Pega audience.
Regards,
Asif
Cognizant
IN
Thanks for the reply!!
All the information in the above link, how we can manually upload the Excel file into the staging directory and how can we parse using MSOParseExcelFile activity.
But in my scenario, am getting the Excel ByteStream from Email Listener under pyAttachmentPage in Property pyAttachvalues. ?Need to parse the content and copying it to clipboard.
I can find only 2 steps
1. Need to convert the file and placing it in a Staging directory
2. Then, I can use MSOParseExcelFile activity to parse the excel data.
W.r.t #1, I am looking for code to convert the pyAttachValues Bytestream into Excel File and to place it in Staging directory.
JPMorgan Chase & Co.
US
Hi,
I have the same requirement in a project - i.e to parse the Excel file which is in the incoming email attachment. Did you find the solution?
I also tried MSOParseExcel. But it needs file in the Service Export directory. Any luck on how we can get the pyAttachmentPage.pyAttachvalues into the Service Export directory?
Thanks.
Cognizant
IN
Hi, So far I didn't get any helpful answer on that. Lets see.
Pegasystems Inc.
US
So this has nothing to do with a file listener?
Cognizant
IN
Sorry It's My Bad. I don't understand your question.
JPMorgan Chase & Co.
US
You are right! We have deviated to Email listener. Pls let us know how we can take an Excel file attached to the incoming email and parse it? Thanks.
Cognizant
IN
Whatever it may be, both in File Listener/Email Listener, we do get only pyAttachValues tag in pyAttachmentPage. The question is how to convert the bytestream into respectivefiles(image, excel or txt files)...
Pegasystems Inc.
US
Hi all,
Sorry missed the replies... ty moderator for the reminder!
Anyway not sure I have a complete understanding but here goes.
You have a Base64 encoded stream in a property on the clipboard ... so what you need to call is a base64decode on that property and 'do something' with the result?
Is that right? How it got on the clipboard is not the issue?
off the top I don't know the answer, but have I got the right question?