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,

you are giving type as CSV

for excel use this

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

Regards
Ankur

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

snavuluri
Giga Contributor

Hi Ankur,

    Still getting same. Any other solution please. on clicking yes in excel. it show an empty sheet.

find_real_file.png

Regards,

Suresh.

@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

Hello @Ankur Bawiskar ,

 

I have used this same logic to export almost 1lakh data from computer table as well as some details from sys_audit table via fix script.

But the script is not running after 5k data and the transaction is getting canceled with message "Available memory is almost depleted".

Can you please help me on this, how to fix this error.

 

Thanks,

Aprajita

@Ap_1 

can you post this as new question as this is an old thread?

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