How to add new column in CSV/Excel file in attachment ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2025 05:22 AM
There are some csv files contains 10k rows are supposed to add manually to the record, but for later operation we have to add one more column to the csv file.
Is there a way that we can get the file from attachment table and add one more column with header and values and add to the records attachment again .
Appreciate the responses.....!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2025 02:23 AM
Hi Ankur,
To clarify my requirement:
I have a CSV file that is currently attached to one record. I need to add a new column to this file, and then attach the updated file to a different record.
Thanks,
Chandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2025 02:55 AM
I shared approach for that only.
1) grab the file, read it row by row
2) then add 1 new column
3) use GlideSysAttachment API to upload the new content to a new csv to another record
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader