Question
Infosys
IN
Last activity: 16 Sep 2020 1:40 EDT
How to parse CSV file which is attached a case?
How to parse a CSV file which is manually uploaded in Case?
***Edited by Moderator Marissa to update Content Type from Discussion to Question; update Platform Capability Tags***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Updated: 14 Jun 2021 7:38 EDT
Pegasystems Inc.
IN
Do you want to parse CSV file into a pagelist, if yes Please find the below article which might be helpful.
https://collaborate.pega.com/question/how-parse-csv-page-list
Infosys
IN
Hi Kanap,
thanks for response.
in my situation, i have to copy csv file content from an attachment. Need logic to get the content from case attachment.
Capgemini
FR
Hi,
To get content from case attachment, loop on pyAttachments property and open the attach file based on they key of the elements in the list that are typed (should probably use attachment category to type those CSV files) that you are look for.
Once you have the object with the content you can apply some rule to parse it.
To see the right way to do it, just copy what Pega is doing ! Trace what is hapenning when you import a csv file into a data type !
Regards
Pegasystems Inc.
IN
Hi,
You can use pxParseExcelFile Activity to read a spreadsheet. This is available since 8.1. Here is the param list if that helps.
Parameter |
Description |
FSFileName |
A name of a file to parse |
TemplateRFB |
Template details in the Fileformat!Filename!xlsx format |
sheetsToParse |
Comma-separated value of sheet names. If the parameter is empty, an application skips the validation and parses all the sheets. |
sheetWiseData |
When checked, an application organizes parsed data sheetwise by using the pySheets(sheet name) page group. |
hasHeader |
An application returns a list of template sheets with a header that have two rows – a header and a property information, and a list of templates without a header with a row with property information only. |
bDeleteFile |
When the value is true, an application deletes the file after parsing. |
Hi,
You can use pxParseExcelFile Activity to read a spreadsheet. This is available since 8.1. Here is the param list if that helps.
Parameter |
Description |
FSFileName |
A name of a file to parse |
TemplateRFB |
Template details in the Fileformat!Filename!xlsx format |
sheetsToParse |
Comma-separated value of sheet names. If the parameter is empty, an application skips the validation and parses all the sheets. |
sheetWiseData |
When checked, an application organizes parsed data sheetwise by using the pySheets(sheet name) page group. |
hasHeader |
An application returns a list of template sheets with a header that have two rows – a header and a property information, and a list of templates without a header with a row with property information only. |
bDeleteFile |
When the value is true, an application deletes the file after parsing. |
outputPageName |
When you define this parameter, an application saves all the error, warning, and information messages on this page. When you leave this parameter blank, an application saves the messages on the primary page. |
Regards,
Suman
TCS
US
Hi Suman,
Does this activity pxParseExcelfile support CSV file type? or it only works with excel file.
FYI, we have requirement to consume csv file type only and parse it to a pagelist, and i am getting unrecognized file type error.
Appreciate everyones inputs.
Pegasystems Inc.
IN
Hi Niladri,
This only support XLSX files.
-Suman
IN
Hi,
To read uploaded excel file
Use pyWorkPage.pyAttachments or pxRequestor.pyFileUpload
parse the CSV file using pxParseExcelFile activity.
Thanks..!
Pegasystems Inc.
IN
Hi Mahi,
You can follow the steps in the attached document to parse the excel file, it will help you.
Thanks
-
Antony Lawrence R