Download the data to the EXCEL or CSV file.

Aman44
Tera Contributor

I need to download the data which is stored in an array to Excel or CSV file through script. Can you please help me with the requirement.

 

I have some  custom 10 records data stored in array. When we click on button or link, So I need to download those records into excel or csv file through script.

 

5 REPLIES 5

Deepak Shaerma
Kilo Sage

Hi @Aman44 

Directly embedding a download link within an gs.addInfoMessage in ServiceNow to trigger the export of data (e.g., into Excel or CSV) is not straightforward because of the way ServiceNow handles messaging and content security policies. Nonetheless, you can achieve a similar outcome by adopting a more integrated approach. This involves utilizing a Scripted REST API to handle the export and providing users a link to trigger this API for downloading the desired data.

Note: Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me..
- Keep Learning ‌‌
Thanks & Regards 
Deepak Sharma