AbhishekGardade
Tera Sage

Hello Mahfooz,

Below is the code for Fetching Contents from Excel File

var parser = new sn_impex.GlideExcelParser();

var attachment = new GlideSysAttachment();

// use attachment sys id of an excel file attachment

var attachmentStream = attachment.getContentStream('f18e8e0a1b2f3300364d32a3cc4bcb99');

parser.parse(attachmentStream);

//retrieve the column headers

var headers = parser.getColumnHeaders();

var key = headers[0];

var value = headers[1];

//var obj = {};

while(parser.next()) {

                        var row = parser.getRow();

                        //print row value for both columns

                        gs.log(row[key] + ': ' + row[value]) ;

               //         obj[row[key]] = row[value];

}

Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies