Reading an excel spreadsheet using client script in service catalog

Ravish Shetty
Tera Guru

Hi all,

 

Is it possible to read the spreadsheet information that the user will attach to a service catalog request before they submit?

 

we want to validate the contents of the spreadsheet here before the RITM gets created.

 

Thanks,

Ravish

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Ravish,

You can try Client Script + Script Include and within Script Include use GlideExcelParser method to access file data.

https://developer.servicenow.com/dev.do#!/reference/api/orlando/server/sn_impex-namespace/GlideExcel...

View solution in original post

5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Ravish,

You can try Client Script + Script Include and within Script Include use GlideExcelParser method to access file data.

https://developer.servicenow.com/dev.do#!/reference/api/orlando/server/sn_impex-namespace/GlideExcel...

thanks Pradeep

Hi Pradeep, would you also know how to get the right attachment that is being submitted by the requester? The attachment gets stored as below with table as 'sc_cart_item' and the sys_id is something different which cannot be found in the 'sc_cart_item' table. The challenge is to query the right attachment record and then process it using 'GlideExcelParser'. As a workaround, i am checking for the last attachment upload by user against the 'sc_cart_item' record with a specific attachment name.

find_real_file.png

sachin_namjoshi
Kilo Patron
Kilo Patron

Below article has solution to read excel file on client side

 

https://community.servicenow.com/community?id=community_article&sys_id=fc63aa4edb81885814d6fb243996196c

 

Regards,

Sachin