how can i export data into excel [.xlsx] via script

snavuluri
Giga Contributor

Hi All,

 Please guide on,  how i can export data into excel [.xlsx] via script.

 

Regards,

Suresh.

1 ACCEPTED SOLUTION

@snavuluri 

we forgot adding the underscore

now it should work fine

g_navigation.open('/' + tableName + '_list.do?EXCEL&sysparm_view=ess', '_blank');

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

29 REPLIES 29

Hi,

Thanks for this solution. This seems to download an .xls file however, is it possible to modify this to download .xlsx file?

snow123
Kilo Contributor

Hi Ankur,

         One more suggest on code, need to have a script from which i can filter the data and download the required columns, not directly calling the download URL.

 

Regards,

Suresh.

You might have to customize that further as per your requirement

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

snow123
Kilo Contributor

Hi Ankur, Customize in script or manual filter.

if need to customize in script, please suggest the script.

 

Regards,

Suresh.