Using local copy of SheetJS

gdm1411
Mega Contributor

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

1 ACCEPTED SOLUTION

gdm1411
Mega Contributor

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).


View solution in original post

9 REPLIES 9

gdm1411
Mega Contributor

And, it appears to me that you must work with an attachment - you cannot reference a spreadsheet on disk or from a url.


gdm1411
Mega Contributor

Anyone else have any thoughts?


gdm1411
Mega Contributor

Help


gdm1411
Mega Contributor

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).


Juanjo
Tera Contributor

It is not needed an external server, you can include the library in UI Stript but xlsx_full will fail, add the intependent libraries:

xmls

jsxip

and it will run correctly.

 

find_real_file.png