Create Excel Spreadsheet from script

r_t_bryan
Kilo Expert

I am attempting to run a background script to query a table, and put the results into a excel spreadsheet. I need to know if this is feasible from scripting and if so, what the best solutions would be.

Thanks in Advance,

Robert

11 REPLIES 11

Mike Meyers wrote:



How to create an excel like this? The only way I know would be to create a new table and list/view according to the required format, create those records via scheduled job and then use the ootb reporting/scheduled excel export. If possible, I would like to skip the "new table, new records" part. Is it?


You should be able to create a new list/view with a filter containing the required records against an existing table.  



Consider creating it as a report with aggregate values (sum/count) in the rows and a grouping function - that should give you the data.



How it's exported as Excel, I'm not sure. (I'm not an Excel whizz - I tend to avoid it)


Hello,


I have a trick, but need help to help us "I'm new on ServiceNow"


I think the function must exist somewhere in ServiceNow because we can use it a right click on a list:


find_real_file.png


So I looked in the "UI ACTIONS" but I did not find the script/function, somebody know where can found the script/function


Regards,


Can I achieve this same by any SCRIPT?

Mean I can write the script to export data in Excel or CSV file?

Please accept my solution if it works for and thumps up.

madanm7786
Mega Guru

Hi Robert,



Did you find any solution for this. We also have a similar requirement to create a spreadsheet from script.




Thanks,


Maddy


Hi,


I suggest to create a report and configure a schedule email report to send it out by email in the format you desire.


Except you would reporting on system tables that is not allowed.



Hope it helps!



Regards,


Valentina