Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Activities for integrating cases with Excel documents

Updated on March 29, 2022

To integrate case data with external resources, call the pxParseExcelFile and pxGenerateExcelFile activities that Pega Platform provides. By calling these activities, you can import and export case data by using Excel files.

For example, if a customer in a bank loan dispute provides income information in an Excel file, you can use the pxParseExcelFile activity to read the file and integrate the data into the case processing.
The pxParseExcelFile and pxGenerateExcelFile activities are both final activities and APIs.

The pxParseExcelFile activity

The following table lists the features that Pega Platform supports when parsing Excel files with the pxParseExcelFile activity:
FeatureNameSupported in Pega Platform 8.1Supported in Pega Platform 8.2 and laterDescription
Supported file format.xlsxYesYesN/A
Row-level parsingYesYesThe application parses an uploaded file row by row and replaces every cell value with a corresponding value from the clipboard.
Sheet-specific parsingYesYesThe application parses specific sheets within an Excel file after you parse the required sheet names as a comma-separated parameter. Otherwise, the application parses all of the sheets.
Supported Excel cell typesStringYesYesN/A
NumericYesYesN/A
BooleanYesYesN/A
FormulaNoYesN/A
DateNoYesN/A
Supported clipboard data typesStringYesYesN/A
IntegerYesYesN/A
DoubleYesYesN/A
DateYesYesN/A
BooleanYesYesN/A
Properties from any clipboard page, such as a report definition or data pagePageYesYesPega Platform supports only single-level page lists, for example in the following format:
PageListYesYes
StylesFont, cell, colorYesYesThe application ignores any cell styles while parsing data to the clipboard.

The following table lists the parameters that Pega Platform supports when parsing Excel files with the pxParseExcelFile activity:

ParameterSupported in Pega Platform 8.1Supported in Pega Platform 8.2 and laterDescription
FSFileNameYesYesThe name of the file to parse.
TemplateRFBYesYesTemplate details in the Fileformat!Filename!xlsx format.
sheetsToParseYesYesSheet names stored as comma-separated values. If the parameter is empty, the application skips validation and parses all of the sheets.
sheetWiseDataYesYesWhen checked, the application organizes parsed data sheetwise by using the pySheets(sheet name) page group.
hasHeaderYesYesThe application returns a list of template sheets with a header that has two rows – a header and a property information row, and a list of templates that have headers but no property information row.
bDeleteFileYesYesWhen the value is true, the application deletes the file after parsing.
outputPageNameYesYesWhen you define this parameter, the application saves all the error, warning, and information messages on this page. When you leave the parameter blank, the application saves the messages on the primary page.

The pxGenerateExcelFile activity

The following table lists features that Pega Platform supports when generating Excel files with the pxGenerateExcelFile activity:
FeatureNameSupported in Pega Platform 8.1Supported in Pega Platform 8.2 and laterDescription
Supported file format.xlsxYesYesN/A
Column-level generationYesYesThe application generates a file column by column, supporting both homogenous and non-homogenous types of data, for example, columns with an unequal numbers of rows.
Supported template typeRule File Binary (RFB)YesYesTemplate sheets with a header need to have two rows – a header and a property information row. Template sheets without a header row still need to have a property information row.
Supported Excel cell typesStringYesYes
NumericYesYes
BooleanYesYes
FormulaNoYes
DateNoYes
HyperlinkNoYesSample cell value: {.pxResults().linkToSheet HYPERLINK} where linkToSheet is a text value in the following format: ".myLabelPropery||.myURLProperty"hyperLinkType is one of the values: EMAIL, URL, SHEET or <empty>.

For example: ".pyID|URL|.pyURLContent"

Supported clipboard data pagesTextYesYes
DecimalYesYes
DoubleYesYes
IntegerYesYes
DateYesYes
TimeOfDayYesYes
DateTimeYesYes
TrueFalseYesYes
Properties from any clipboard pagePageYesYesPega Platform supports only single-level page lists, for example in the following format:
PageListYesYes
StylesFont, cell, colorYesYesThe application clones styles from a template and applies them to respective column cells in the generated files.

The following table lists parameters that Pega Platform supports when generating Excel files with the pxGenerateExcelFile activity:

ParameterSupported in Pega Platform versions 8.1 to 8.3Supported in Pega Platform 8.4 and laterDescription
FSFileNameYesYesThe name of the file to download.
TemplateRFBYesYesTemplate details in the Fileformat!Filename!xlsx format.
DownloadFileYesYesIf the value is true, the application downloads the generated file.
DeleteFileAfterDownloadYesYesIf the value is true, the server deletes the generated file after the application downloads the file.
evaluateFormulasLaterNoYesIf the value is true, advanced formulas defined in the template evaluate after you download and open the generated Excel file. Otherwise, the server evaluates the formulas in the template by using the Apache POI library (subject to support by the library).

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us