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
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.
You can create CSV manually(using joinarray) and then use smart service to export it.
The Excel Tools plug-in has "export CDT to Excel", which still works fine despite being (officially) deprecated. You don't need a unique CDT for everything you want to export, you can simply take the data you want to export and stuff it into an array of a dummy CDT containing N number of plaintext fields, and export that.
apart from other options shared earlier, one other option is to write the aggregated data in a temp table, have a record configured on that temp table. use that record to create the grid. and now you just have to pass showExportButton as true
You can either have a temp record type and use that as a source to show the export button in the grid. Or if possible you can also create a view with the desired data and use "export DSE to excel" smart service, configure it in the process model and call it using start process and get the generated document id from the process inside the interace for the user to download it by document download link.
Hello sadhus2473
I would choose what Mike Schmitt has suggested and not make it more complex.
Agree with Konduru Chaitanya ... Mike's solution is easier and works
HI Mike,
I found Excel Tools, but I'm not able to find " export CDT to Excel ".
Could you please share plugin link if possible.
Thanks
Try installing the Excel Tools in your environment and you will see the "Export CDT To Excel (Deprecated)" as part of the smart service list
Did you install excel tools? If so, did you try the Node Search tool within the process modeler?