Is it possible to export data from several tables to multi tabs Excel ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 06:56 PM
Hello,
I have requirement to export data from several tables to multi tabs Excel (by script) ?
Does SeviceNow support this ?
Please, advice.
Thanks in advance.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 07:48 PM
HI
If you are trying to export your data from multiple tables from ServiceNow to multiple TABs in your Excel sheet, this will not be possible.
Exporting will always result in having ONE TAB in Excel.
To export data from multiple tables, you need to create a view where you can do the joining you would normally do in a SQL query. Here's the link to the documentation on creating views. This will help you to join tables.
But in some cases, it will not be possible to even JOIN the tables, because the even do not have any relation at all. That way, your cannot use the view solution.
In that case, you will end up creating multiple files (one per table) and importing them to ServiceNow as well.
Anyhow, the table by table approach is much simpler and not that error prone. You should really think about going the separate tables way.
If you have a main table that you want to export, and you need only "a few" additional tables, the view is fine. But if you have multiple tables, where you (even maybe) want all fields to be exported/imported, I strongly recommend, NOT to go with the View path.
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2022 01:07 AM
HI @ALEXANDER LYUBAREV ,
I also have the same requirement. Were you able to achieve it? If yes then please do share how to do it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 06:12 AM
Hi, this post is from a long time ago, and you probably have an answer by now. You will have to export each table/set of records individually and then run a PowerShell script to create the XLS and add the table data as individual worksheets.
There might be a COTS (Commerical Off the Shelf) application you could purchase for this, but I couldn't find one.
If you found a good solution, please can you let me know?
Many thanks,
Jason