- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2017 06:36 AM
I would like to use the Excel javascript library SheetJS (GitHub - SheetJS/js-xlsx: SheetJS Community Edition -- Spreadsheet Parser and Writer) in a UI page. I've created the page. and referenced the github files, and all works well. The actual .js file is found at https://raw.githubusercontent.com/SheetJS/js-xlsx/master/dist/xlsx.full.min.js and it's about 870kb.
Now I need to move the library into my instance of service now, as our production environment is on a closed network, and we have no access to github.
I tried making a script include, but it tells me there is a 64k limit.
I successfully created a UI script. When I put in the url in my browser, with a .jsdbx extension, it asks me if I'm downloading a file - I save it, and it looks like the original javascript.
However, when I reference it in my UI page, it throws an exception (can't find XSLX object), so I'm obviously doing something wrong. If you can't tell, I'm new to SN.
I'm just looking for the right way to put the original file on the SN instance, and reference it in my pages. Any direction would be appreciated.
GregM
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 10:13 AM
Well, it appears the only solution is to host the file on another web server on our closed network, say IIS or Apache, and fetch it from there into the SN page.
Best I can tell, SN does not support the idea of just hosting a page (or file).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2017 06:57 AM
Hi Greg,
Instead of trying an external library, you can try GlideExcelParser API which is inbuilt and can parse .xlsx files( which are present in sys_attachment table)
https://developer.servicenow.com/app.do#!/api_doc?v=kingston&id=GlideExcelParserScopedAPI
Thanks
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2017 05:03 AM
Gaurav,
Thanks. That's good to know, but I'm using Helsinki. It does not seem to be available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2017 05:28 AM
Yeah, its available starting Istanbul I believe though it's better to get upgraded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2017 12:41 PM
In looking at the docs. it appears in Jakarta. As you can imagine, I have no control over the version.
So I'm still looking for a way to upload and reference.