- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2018 11:29 PM
I need to download all active incidents of the incident table in the xlsx format ,When a button is clicked.Need to do this in ui page..
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 01:12 AM
Hello,
sorry, i was checking the this in simple html page.
for UI page, below thing worked for me.
html:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<button type="button" onclick="downloadIncidents()">Click Me!</button>
</j:jelly>
client script:
function downloadIncidents(){
window.location.href='https://instanceName.service-now.com/incident_list.do?sysparm_query=active=true&EXCEL';
}
This should work for you also.
Thanks,
Ali
Thank you,
Ali

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 12:33 AM
Hello,
Not sure about xlsx format, but using below link you can download all active incidents in xls format.
just give href url as below in your button.
https://instance_name.service-now.com/incident_list.do?sysparm_query=active%3Dtrue&EXCEL
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 12:44 AM
it shows an error
<input type="button" value="download" href="https://instance_name.service-now.com/incident_list.do?sysparm_query=active%3Dtrue&EXCEL" onclick="myfunc()"/>
Error:
The reference to entity "EXCEL" must end with the ';' delimiter.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 12:48 AM
replace instance name with your instance name in URL. like dev12345.
<input type="button" value="download" href="https://dev12345.service-now.com/incident_list.do?sysparm_query=active%3Dtrue&EXCEL" onclick="myfunc()"/>
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 12:55 AM
I used my instance name but it shows the error
Error:
The reference to entity "EXCEL" must end with the ';' delimiter.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 12:56 AM
I tried below and it worked for me.
<button type="button" onclick="window.location.href='https://dev12345.service-now.com/incident_list.do?sysparm_query=active=true&EXCEL'">Click Me!</button>
Thanks,
Ali
Thank you,
Ali