Excel Spreadsheets with Live Connection to ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2016 01:35 PM
While it can be quick and dirty to export data from ServiceNow into Excel, that data quickly becomes stale and disconnected from its source. If you prefer to have a refreshable connection between Excel and ServiceNow, you can make use of the web services available in ServiceNow to make the connection.
These instructions are written using Excel 2016 and the Geneva edition of ServiceNow.
- Locate the name of the table in ServiceNow that you want to pull data from. If you're a developer, you can look these up directly. Regular users can do this in a couple of different ways. The easiest is to create a new report from the "View / Run" module of the Reports application. There is a field there to select a source table. The name of the table in square brackets is the name of the table you'll use in subsequent steps.
- Open a blank workbook in Excel.
- From the ribbon, find the Data tab and choose New Query, From Other Sources, From Web.
- For the URL, put in https://<instance>/api/now/table/<tablename>?sysparm_limit=10
Replace <instance> with the name of your own instance (e.g. dev01.service-now.com) and <tablename> with the table you want to query (e.g. incident). The first query parameter will just limit your query to 10 rows while you are testing to avoid pounding your server while you learn what you're getting back. You can change to any number, or remove that parameter altogether. - The first time you try to access a particular domain, you will be asked how you want to authenticate to that resource. You'll probably want to choose Basic authentication and put in a username and password. These will be stored within the Excel document, which means they are only as secure as the document itself, so use caution.
- Assuming you can successfully authenticate, you will see the Query Editor. The result in a single object which is a List. Click on the link List to expand it.
- In this example, I used sysparm_limit=10 so that I got 10 rows from my incident table. If I were to click on an individual record in this list, I would see all the attributes of that record. But what I'm really interested in is to see all those attributes as columns in a table view. To get that, I need to convert the query response into a table. Use the To Table button on the ribbon to do this. Just accept the defaults on the dialog box that pops up and click OK.
- Once you've converted to a table, you have a magical button to expand records into columns, to the right of each expandable column. When you click that button, you can select which columns should pop out of the expansion and if they should have a prefix from the old column name.
- Once you have the records you are looking for, you click Close & Load in the Query Editor and you'll be returned to your spreadsheet with all the data in a nice table that you can manipulate in the usual Excel fashion.
You can repeat the query for multiple tables and relate data together in Excel in ways that are hard to do with the normal ServiceNow reporting tools. (I love PivotTables.)
You can explore more ways to manipulate the URL string for your original query by using the Rest API Explorer in ServiceNow if you have enough rights on your instance. There are additional query parameters for the query and for the display values that are handy to play with.
Of particular value is sysparm_query where you can filter the records before you pull them down into Excel. This is especially helpful for very large tables. You can learn the syntax of the sysparm_query parameter by building filters in the regular ServiceNow user interface and seeing how those translate into URLs. For example, sysparm_query=active%3Dtrue will limit to just the active records on the table. The full query URL might look like this:
https://<instance>/api/now/table/<tablename>?sysparm_limit=10&sysparm_query=active%3Dtrue
Anytime you're working with your spreadsheet, you can go to the Data tab on the ribbon and choose Refresh All to get the most current information out of your ServiceNow instance.
I haven't been using this for very long, so I'm open to feedback about this procedure and how it can be improved or better documented.
- 55,569 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2018 03:02 PM
I don't have a good answer for you on this one. The 400 error makes it sound like the call from Excel is getting malformed somehow. I've had luck in Excel with deleting and recreating things in exactly the same way and having it work the second time. Beyond that, I'm not sure why you're getting that error only in Excel.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 01:09 PM
So I am currently trying this in a dev instance at the moment and I am getting a file download prompt to download a .json file for my table data. Has anyone experienced this before?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2019 07:35 AM
Hi Bradley,
Thanks for the steps.
I was trying to do the same but removing the sysparam_limit is throwing error in JSON. Its not connecting to my instance. May I know is there a maximum limit we have to put? Currently My application table contains around 70000 records.
https://myinstance.service-now.com/api/now/table/cmdb_ci_appl?sysparm_limit=10
- Is there way we can put filter condition while retrieving the data.
- Can we open the record in more good Excel format & download for later use?
Assistance here in greatly appreciated.
Thanks,
Suchitra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2020 07:09 AM
Hi,
I have got this working (connection and pulling data) great tutorial thank you. I do have a question though, it would appear that any reference field is not pulling the value, in the spread sheet it is just listing as [Record]. Is there anyway around this please?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2020 08:03 AM
You can use the magic expansion button mentioned in step 8 each time you encounter a [Record] that needs to be split into fields. You don't have to keep all the fields that the record expands into. You can just keep the name if you want.