- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2025 11:07 AM
Hi All,
I am trying to achive to pull the data from excel data sheet to Mrvs. Which I am able to but now I want that the excel should take the required data in mrvs from row 4 ownward and row 3 is work as header. like below ss. where row 3 are headers and I am sharing my script script include where I am getting attcahemet. please let me know what changes I need to make in the script to achive this.
script include----
getdata: function() {
var id = this.getParameter('sysparm_id');
var obj = [];
var excelid = id;
var parser = new sn_impex.GlideExcelParser();
var attach = new GlideSysAttachment();
var attachmenttest = attach.getContentStream(excelid);
parser.parse(attachmenttest);
while (parser.next()) {
var row = parser.getRow();
obj.push(this.prepareData(row));
}
return JSON.stringify(obj);
},
@Ankur Bawiskar can you help me with this
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 03:11 AM
Hi,
The lines I have added will skip the first three line. Did you try the script?
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 03:33 AM
yes But I change the header to row 3 it is not working. I pasted mine please have a look if header is in row 3 the above data in row one and two is for just information we not capturing that data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2025 08:28 PM
try the approach shared by @palanikumar and let us know the feedback
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 02:46 AM
The code which I am going to share that will work I think As we want 3 row as header --