Question

parse excel file

May i know how to Parse an Excel file

***Updated by moderator: Lochan to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

Pega
May 15, 2012 - 5:28am

Dillo,

I’m sorry but can you please be more specific and give us some more context?

Marco.

May 15, 2012 - 9:25am
Response to Marco Looy

Marco,

Actually there is option in pega for parsing a CSV file but i would like to know whether there is any method of parsing directly a excel sheet without converting it to CSV or XML file

Dillo.

May 15, 2012 - 9:51am
Response to DilloDaniel

At this time its just CSV or XML. We are looking at better options in the near future for native XLS conversion.

July 4, 2012 - 1:52pm

Hi Dillo,

Please find my approach below to parse an excel sheet data into a pagelist.

Excel File Parsing using PRPC:

-----------------------------------------------

Create an excel template with all the column headings and keep it ready.

Make sure that the column values are pointing to a Pagelist property.

For example:

-------------------

Let us consider a Pagelist name as "EmpDetails".

Make sure that this Pagelist is created in PRPC Classgroup or AppliesTo class of the activity which is calling "MSOParseExcelFile" activity internally.

Create the excel template as shown below:

---------------------------------------------------------------------------------------------------------------------------

SNo.                               | UserId                                |  FirstName                      |

---------------------------------------------------------------------------------------------------------------------------

{.EmpDetails().SNo input} | {.EmpDetails().UserId input} | {.EmpDetails().FirstName input} |

{.pagelist().property input}

Create a Rule-File-Binary with the inputs as :

Application (Folder Name) : webwb

File Name :

File Type: xlsx

Upload the above excel template in the Rule-File-Binary and Save.

Create a new activity under the required classgroup.

Create a new page and call the "MSOParseExcelFile" from this activity.

The "MSOParseExcelFile" activity open the Rule-File-Binary, parses the excel sheet.

Make sure that a pagelist property is created under the AppliesTo class and the type of the pagelist is similar to the data being retrieved from the excel sheet. (That is,  here "EmpDetails" pagelist is created.)

Parametes required by MSOParseExcelFile:

-------------------------------------------------------------------

pxRequestor.pyFileUpload  --- For file attaching UI to hold the file path

webwb!<rule-file-binary>filename! xls --- Note the exclamations

xls or xlsx

Hope this helps..

July 6, 2012 - 1:53am
Response to PawanKumar

Hi Pawan,

i have a requirement for parsing a CSV file with headers...... Could u please help me in this one as well.

I have tried the steps mentioned in the pega forums(http://pdn.pega.com/DevNet/prpcv5/kb/25573.asp) ,which needs the file listeners & process flows.

But for my case i have to upload the .CSV file manually(No fileListerners & no process flows)

Thanks in advance

Dillo

September 12, 2012 - 4:02pm
Response to PawanKumar

is this in the Pega Help File or in PDN so clients know how to use this feature? -- This post makes it sound easy, but I couldn't find it anywhere else!

Pega
February 20, 2014 - 3:01am
Response to PawanKumar

Hi,

I have a issue where the file is not saving on server when attaching using the flow action “AttachAfile”. Also the pxRequestor.pyFileUpload is empty.

But some cases where we upload requirements and specifications for the application are saving in the server and in this case pxRequestor.pyFileUpload is having file path.

I appreciate if anyone can give some inputs regarding this issue.

Thank you,

Rao

November 9, 2015 - 5:59am
Response to PawanKumar

Thanks for approach you mentioned. Only issue with above approach is when we have large number of records in a spreadsheet, Pega is loading all of them onto clipboard causing issues. Is there a way for us to mention how many records can be loaded to clipboard at a time or load it into custom table.

Regards,

Praveen