How can I create an Excel file from a script in Servicenow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2021 11:25 AM
I just need a really simple example of how I can create a .xlsx file not .csv. What is the syntax for this when writing with GlideSysAttachment().write?
I've tried:
var gsa = new GlideSysAttachment();
gsa.write(fixGr, 'test.xlsx', 'text/xlsx', data);
but when I go to open the created attachment in Excel, Excel says its may be corrupted or the wrong file type.
Can anyone please provide a simple example of what the data would look like and how to write it properly?
pls help
- 6,225 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2022 11:57 AM
I have a similar need, have you been able how to generate a proper .xls from script? i can only generate a .csv but would prefer an .xls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 11:46 AM
any solution to get in XLSX format?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 01:04 AM
Hello,
Were you able to achieve this? if yes please provide a solution you have used.
Thanks in advcance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 02:31 AM - edited 10-28-2022 01:21 AM
I have a similar need, have you been able how to generate a proper .xls from script? i can only generate a .csv with wps office mod apk but would prefer an .xls.