load CSV from URL

Started by Alberto, August 02, 2022, 16:40:26 PM

Previous topic - Next topic

Alberto

I'm a JS idiot, so please bear with me. I'm trying to update the "Import from CSV" jArchi script from loading a local CSV file, to loading a CSV file from a URL, but can't quite find the JS command that will do so.  load() didn't work. Any other ideas?

Phil Beauvoir

I'm also not so brilliant with JS.  :D But is this more of a generalised JS task? I Googled it and found a few ways to connect to a URL and parse the data from the connection.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Jean-Baptiste Sarrodie

Hi,

you have to create the readFully() function that is able to get a local or remote file and return the content as a string on which you can work. You can find this function here: https://forum.archimatetool.com/index.php?topic=625.msg3499#msg3499

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.