How to dynamically parse Excel attachments with variable column positions into a custom table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi Everyone,
I have a requirement to parse incoming Excel attachments and map the data into a custom table, but the Excel file structure is completely dynamic.
The Scenario:
1. Excel files are received via email and attached to specific Case records.
2. The column positions in the Excel sheet change constantly. For example, the data for a specific field might be in Column 1 in one file, Column 3 in another, or Column 5 in a different file.
Since the column layout shifts and is not fixed, a standard Data Source and Transform Map approach will not work.
My Questions:
1. What is the best practice or recommended scripting approach to parse Excel files dynamically based on Header Names rather than fixed column index positions?
2. Which platform component should be used to trigger this script automatically as soon as the file is attached to the Case record (e.g., Async Business Rule on sys_attachment, Flow Designer, or a Scripted REST API)?
3. If anyone has a working code snippet or script example using GlideExcelParser or any other API that handles shifting columns dynamically, could you please share it?
Any advice, code examples, or edge cases to consider would be highly appreciated.
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
ServiceNow has OOTB ExcelParser API
explore that
GlideExcelParser - Scoped, Global
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9m ago
Hi @rah dev
https://www.youtube.com/watch?v=yBblyrss-CA&t=23s
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti