Can we export data in local variable to excel?

Certified Lead Developer

Hi Everyone,

Is there any way to export data in local variable to excel?

The Actual Requirement is

1. I have created some custom columns in Record Type

2. Generated an expression using Aggregation and stored the data in local variable

3. Created a Grid Report using the local variable

4. Now I need to enable download excel option for the data available in local variable

But Appian is not allowing to enable showExportButton: true(), and getting below error.

Thanks in Advance

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Yes you can do that.

    Create an webAPI with GET method and do the similar logic over there also to manupulate data as per you need.

    In httpresponce configure the header as attachment and CSV type.

     a!httpHeader(
            name: "Content-Disposition",
            value: "attachment; filename=" & char(34) & filename & ".csv" & char(34)
          )

    In Responce body construct a data with delimeter as comma and for line breaks user char(10) with in single click it will download the data as CSV.

    keep in mind if data is huge you cannot pass is as paramete try to do the manupulation inside webapi if not you can construct data and pass it as parameter also.

Reply
  • 0
    Certified Lead Developer

    Yes you can do that.

    Create an webAPI with GET method and do the similar logic over there also to manupulate data as per you need.

    In httpresponce configure the header as attachment and CSV type.

     a!httpHeader(
            name: "Content-Disposition",
            value: "attachment; filename=" & char(34) & filename & ".csv" & char(34)
          )

    In Responce body construct a data with delimeter as comma and for line breaks user char(10) with in single click it will download the data as CSV.

    keep in mind if data is huge you cannot pass is as paramete try to do the manupulation inside webapi if not you can construct data and pass it as parameter also.

Children
No Data