How to Generate Excel Reports from Calculation Logic

Goal: Generate custom MS Excel-based reports from a calculation logic

Use case example: Download a customer-specific price list from multiple sources (Price Lists, Price Records etc.)

Solution:

  • Pricefx API method that executes the logic and creates an Excel output.

  • Use the formulamanager.executeformula method and append the output type and the name of the template: output=xls&templateName=excel_export
    For more details, see the API documentation.

Example: https://localhost/pricefx/demo/formulamanager.executeformula/Market-Pricing?output=xls&templateName=excel_export

Generic Excel Output

Logic example:

image2017-5-9_9-37-32.png

Corresponding Excel output example:

image2017-5-9_9-41-3.png

Logic elements of the matrix format type will be rendered in a separate sheet. The tab's name reflects the matrix element name.

image2017-5-9_9-43-20.png

Excel Template

Similarly as for Quotes and Price Lists, we can enhance the generic output and save it as an Excel template. Such a template can be assigned to any generic logic.

Please refer to Publishing Templates for more details.

image2017-5-9_11-35-58.png