Load excel file on staging table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Can we upload a large Excel file directly into a staging table without converting it into JSON?
I know that ServiceNow provides the sys_import.do endpoint for this purpose, but I don't want to use a modal popup for the file upload. Is there any alternative approach to achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
29m ago
Hi @VaidehiL
You can skip "sys_import.do" by using a Data Source instead. Create a record in "sys_data_source" with Type File, Format Excel, File retrieval method Attachment, and your staging table in Import set table name. Attach the Excel there and click Load All Records.
For large files you can point a Scheduled Data Import at that same Data Source. It runs in the background rather than tying up a browser session.
If you'd like users to supply the file, they can attach it to a catalog item and you move it across in script, then load it with "GlideImportSetLoader". No modal anywhere in that path.
One thing to watch, the staging table columns get generated from the file on the first load, so you can run it manually once before automating the rest.
This article has the full build with the Data Source settings and the script include: https://www.servicenow.com/community/developer-articles/import-on-demand-automate-file-imports-using...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3m ago
what's your exact business requirement here?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
