Export data to multiple spreadsheets of same excel file using background scripts

Aradhika Ramesh
Tera Contributor

Hi All,

 

I need some help on this. I was trying to import data to multiple sheets of same excel using background scripts. But I'm not able to do it. The requirement is that I want list view of multiple tables in single excel sheet. The code which I wrote generates separate excel file for each table list view. Can someone help me here?

 

Thanks!

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

I doubt this can be achieved.

Can you share your current scripts

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Aradhika Ramesh
Tera Contributor

Hi Ankur,

Below is the code that I used to export the list view of the table. But my requirement is that I want all in one excel file

var rm =new sn_ws.RESTMessageV2();

rm.setHttpMethod('GET');

//list view url

var url='';

rm.setEndpoint(url);
rm.setBasicAuth('admin','June@2022');
rm.saveResponseBodyAsAttachment('incident','760b75e92fa15110f6a79dacf699b68e','INC0023243.xls');
var response = rm.execute();