Author Topic: Importing a Glossary from Excel  (Read 4844 times)

jfzouain

  • EA User
  • **
  • Posts: 151
  • Karma: +6/-1
    • View Profile
Importing a Glossary from Excel
« 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
Best regards

Jose Zouain

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: Importing a Glossary from Excel
« Reply #1 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


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12783
  • Karma: +532/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Importing a Glossary from Excel
« Reply #2 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

jfzouain

  • EA User
  • **
  • Posts: 151
  • Karma: +6/-1
    • View Profile
Re: Importing a Glossary from Excel
« Reply #3 on: July 21, 2012, 02:07:18 am »
Thanks will ckeck it out.
Best regards

Jose Zouain

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12783
  • Karma: +532/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Importing a Glossary from Excel
« Reply #4 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

Geert

philchudley

  • EA User
  • **
  • Posts: 721
  • Karma: +19/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Re: Importing a Glossary from Excel
« Reply #5 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
follow me on Twitter

@SparxEAGuru