Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: jfzouain on July 20, 2012, 12:57:58 am

Title: Importing a Glossary from Excel
Post by: jfzouain on July 20, 2012, 12:57:58 am
Hi All

I have being given the task to upload a spreadsheet (excel) with 80 rows of pre-defined glossary definitons into EA Glossary.

What is the best way to do this and how.
I see ways to import elements  and so on, but not Glosary elements.

Thanks
Title: Re: Importing a Glossary from Excel
Post by: Paulus on July 20, 2012, 04:25:06 am
Have you seen this community resource provided by Geert Bellekens (btw thx Geert for sharing!): http://community.sparxsystems.com/resources/scripts/simple-vba-excel-ea-importer?

It is an excellent starting point for what you've in mind. It's straightforward to alter/extend it to import glossary items. You can use the subroutine below to add a term to EA.

Code: [Select]
Public Sub addterm(termType As String, name As String, description As String)
    Dim myTerm As EA.Term
  
    Set myTerm = EARepos.Terms.AddNew(name, termType)
    myTerm.Type = termType
    myTerm.Meaning = description
    'save term
    myTerm.Update
    'refresh glossary collection
    EARepos.Terms.Refresh
End Sub

Title: Re: Importing a Glossary from Excel
Post by: Geert Bellekens on July 20, 2012, 03:26:57 pm
Quote
(btw thx Geert for sharing!)
You're welcome  :)

You can find a (little) bit of extra info on my blog as well: http://geertbellekens.wordpress.com/2012/07/15/simple-vba-excel-to-ea-importer-v2/

Geert
Title: Re: Importing a Glossary from Excel
Post by: jfzouain on July 21, 2012, 02:07:18 am
Thanks will ckeck it out.
Title: Re: Importing a Glossary from Excel
Post by: Geert Bellekens on May 01, 2013, 10:50:04 pm
I've finally found the time to add importing glossary terms in my Excel Importer.
See Simple VBA Excel to EA importer v3 (http://geertbellekens.wordpress.com/2013/04/30/simple-vba-excel-to-ea-importer-v3/)

Geert
Title: Re: Importing a Glossary from Excel
Post by: philchudley on May 02, 2013, 01:15:34 am
Thanks Geert!

Just what I need, I have trimmed your version down to just importing the glossary and it works a treat!

I also added a dialog just to confirm when the import had finished.

Looking forward to meeting you at the EAUG later this month.

All the best

Phil