Is there a way to import relationships created outside Archi (e.g. via a macro in XLS), based on the ID, Source and Target?
That should be possible via a CSV/Excel file assuming that the source and target IDs matched existing IDs in the model. You'd need a JS CSV/Excel parsing library. There's an example here - https://gist.github.com/smileham/1e57a5946235e780dee5a824f664aa3d