Author Topic: Import controlled lists from say Excel  (Read 593 times)

Andy M

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Import controlled lists from say Excel
« on: August 15, 2020, 12:27:28 am »
Hi,

Is it posisble to import a controlled list of values to populate a new enumeration's attributes from say Excel / CSV?

I have a load of codelists that I want to show within my EA model but some have too many items to build manually.

Thanks,


Sunshine

  • EA User
  • **
  • Posts: 954
  • Karma: +83/-7
  • Its the results that count
    • View Profile
Re: Import controlled lists from say Excel
« Reply #1 on: August 15, 2020, 08:13:59 am »
There is a built in CSV importer/exporter but unfortunately it doesn't do attributes.
The other options are;
  • Look at Office integration MDG add-in which will cost a few $$. The on-line help indicates you can import attributes from an excel file but I've not tried it for importing attributes but I can confirm it works for packages and objects.
    https://www.sparxsystems.com/products/mdg/index.html#office
  • Write a Script in JavaScript, JScript or VBScript. If you look at EAScript Lib you'll see some CSV library scripts that would help get you started.
  • Write a JavaScript-Addin - similar to the previous option but implemented slightly differently.
  • Write a C# .Net Plug-in

If you are not a programmer then option 1 is probably the way to go. You can down load a free trial first to see if it does what you want. If you are a programmer and have time then it will be fun doing one of the other options.

Hope that helps.
Happy to help
:)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1778
  • Karma: +122/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Import controlled lists from say Excel
« Reply #2 on: August 15, 2020, 03:16:35 pm »
I think Geert Bellekens has an Excel importer? That's free?

/U
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10438
  • Karma: +343/-30
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import controlled lists from say Excel
« Reply #3 on: August 15, 2020, 04:03:51 pm »

Richard Freggi

  • EA User
  • **
  • Posts: 306
  • Karma: +11/-5
    • View Profile
Re: Import controlled lists from say Excel
« Reply #4 on: August 16, 2020, 02:45:50 am »
There is a built in CSV importer/exporter but unfortunately it doesn't do attributes.
The other options are;
  • Look at Office integration MDG add-in which will cost a few $$. The on-line help indicates you can import attributes from an excel file but I've not tried it for importing attributes but I can confirm it works for packages and objects.
    https://www.sparxsystems.com/products/mdg/index.html#office
  • Write a Script in JavaScript, JScript or VBScript. If you look at EAScript Lib you'll see some CSV library scripts that would help get you started.
  • Write a JavaScript-Addin - similar to the previous option but implemented slightly differently.
  • Write a C# .Net Plug-in

If you are not a programmer then option 1 is probably the way to go. You can down load a free trial first to see if it does what you want. If you are a programmer and have time then it will be fun doing one of the other options.

Hope that helps.

I just bought the office integration MDG and started using it.

Yes you can import attributes with it, it's a 2-step first import the elements then repeat the import again for the attributes.  I can share the process but it would take me several pages to explain it.  It's painful, complex and error-prone.  Each import needs a different profile, template sheets etc.  It took me a few days to learn to use it and a few emails to Sparx support (Sparx support did a great job by the way - prompt and useful replies, I'm very happy with it). You can see my recent posts documenting my troubles.

The Office MDG is incredibly slow - I think it re-scans the whole eap database for every transaction in the 2nd import.  I can only import 1 attribute every 40 - 60 seconds with Office MDG.  My import sheet has about 170,000 attributes over 13,000 classes. (My computer is pretty powerful with with SSD and 32G RAM so it's not a resource issue).  If your model has thousands, not tens or hundred of thousands of elements, then speed should not be a big issue.

I have done the same import with Geert's Excel importer and it works a breeze (plus it took me only 1 hour to figure it out how it works and make some light customization, with zero knowledge of Excel macros).  The full 170,000 + 13,000 import takes maybe 20 minutes (fractions of seconds per item vs. 40 seconds+ for the MDG).  Excellent!

So, if you have the time to learn EA scripting that would be the best route. 

I use both the Excel importer and the MDG because the MDG allows me to import complex package hierarchies, associations and other stuff and I don't plan to learn EA scripting.


Andy M

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Import controlled lists from say Excel
« Reply #5 on: August 18, 2020, 12:03:50 am »
Great. Thanks for all the responses. I'll check out these 2 options.