Import elements from CSV file errors

Started by oysteino, May 20, 2023, 08:58:47 AM

Previous topic - Next topic

oysteino

Hi, I've been trying to import CSV-file for elements generated in Excel following this tutorial

I'm getting "Incorrect Header in Elements file" error for Archi 5.0.2 no matter whether I'm trying elements, relations or properties-file

I'm getting "Incorrect record size" error for Archi 4

Using Windows 64-bit

I've tried
  • Manually creating file and saving as UTF-8 CSV
  • Exporting existing file, delimiting, and importing
  • Exporting, manipulating exactly 1 character, and re-importing
  • Exporting, and directly re-importing to another model. This works, but gives no value

exportAndDelimited-elements.csv
exportAndReimportThatWorks-elements.csv
manualCSV-elements.csv 
exportAndReimportModified-elements.csv 

oysteino

Okay, seeing the issue now. All of the above attempts give some error in the quotation marks.
Either
  • Double, e.g. ""ID""
  • None, e.g. ID

Correct representation should be single quotation marks around all of them.

Import issue.PNG

Issue remains the same, though. I want to quickly manipulate elements, properties and relationsships in excel. Anyone see what I'm doing wrong?

oysteino

Okay, so I've found a workaround. I created an excel macro, but I hope someone can help with an easier fix as it is somewhat cumbersome.

1) Define the elements as described in the video above (or similarly for properties and relations)
2) Mark all the cells you want included in csv
3) Press "Generate CSV"
4) Write exact output. E.g. "C:\Archimate\elements.csv"

QuotesCSV.xlsm

Xiaoqi

Hi Oysteino,

I've recoreded one short video here https://youtu.be/YaSxrXofo24 with using the latest Archi 5.0.2, on how to export and import model from CSV, for your reference.

My experience is need specific notice on the first column in Elements.csv, which you should ensure that's employ with do not miss the ";", and alos the last two columns are normally empty but don't miss the enough ";".

And, suggest to edit CSV in some code IDE, like VS Code, prevent to use Excel. Just my two cents input. Good luck!

Regards, Xiaoqi