Simple VBA Excel to EA importer v4

Version 4 on the Excel to EA Importer now introduces a feature to export Tagged Values to Excel, edit them in Excel and import the changes back into Enterprise Architect.

The Excel to EA importer is a rather simple tool to import stuff into EA. It has been available on the Sparx Community Site since 2009 and it has always been one of the most popular resources.

Version 2 was a small improvement allowing for different types of Elements.

Version 3 added the feature to import the glossary into EA.

Now in version 4 we have yet another tab Tagged Values that will be used to export and import tagged values.

TaggedValuesTab

 

Free download

[ecwid_product store_id=”6824265″ product_id=”48071402″]

Elements and Attributes

Columns A till F are used in the sheet ElementsAndAttributes . Fill in the the columns with your own data.

  • Type
    Fill in the type of the Element you wish to import. This column should contain either Attribute or one of the EA Element types as defined in the documentation of EA.Element.Type. An attribute will be added to the last specified Element.
  • Name
    The name of the element or attribute.
  • Stereotype
    The stereotype of the element or attribute. Use null to specify an empty stereotype.
  • Description
    The description of the element or attribute.
  • Attribute Type
    The type of the attributeThis column should not be used for Elements. Use null to specify an empty type.
  • Attribute Length
    This value will be added as a tagged value with the name length on the attribute.  Again this is only for attributes.

Glossary

In the 2nd sheet Glossary you can fill in columns A until C with:

  • Term
    The term name is mandatory.
  • Type
    The type of the term is mandatory as well
  • Meaning
    The meaning of the term is optional.

Tagged Values

The Tagged Values sheet can only be used to edit existing tagged values, not for importing new tagged values into EA. It contains the following columns

  • GUID
    The unique identifier of the tagged value. Used to find the tagged value in the model. – Do not change.
  • Type
    Used to indicate if the tagged value is on an element, attribute, operation or connector. – Do not change
  • Property
    The name of the tagged value. This field can be used to rename tagged values
  • Value
    The value of the tagged value. This field can be edited.
  • Notes
    The notes of the tagged value. This field can be edited.
  • Owner
    The name of the element that owns the tagged value. Used as a context indicator. Changing this field will have no effect.

Export/Import

Once all you data has been filled in you are ready to import the data into EA.

Excel Addin tab

  • Open the sheet you wish to import
  • If you are on the ElementsAndAttributes sheet press the button Import, or run the macro (Alt-F8) importFromExcel
  • If you are on the Glossary sheet press the button Import Glossary, or  run the macro (Alt-F8) importGlossaryFromExcel
  • On the Tagged Values  sheet you can press the button Export Tagged Values, or run the macro (Alt-F8) exportTaggedValuesFromEA in order to get all tagged values into the sheet.
  • After modifying the content of the tagged values press the button Import Tagged Values, or run the macro (Alt-F8) importTaggedValuesFromExcel and press start to start import.
    TaggedValuesDialog

 

Customizing

The code of this little tool is embedded as VBA in the document, and as such can be edited by anyone with basic programming skills.

To open the code editor press Alt-F11.

There are three major parts for the code

  • ExcelImporter
    The module that contains the importFromExcel macro. This is where you want to make changes.
  • EAConnector
    A facade for EA’s API containing all kinds of useful functions. You probably don’t need to change anything here.
  • ExcelConnector
    A facade for Excel with the code to get the values of the sheet. Again probably no need to change anything here.

Both the Excel file as the VBA code embedded in it is free for use. Just be kind and leave the reference to my name in the code if you use it.

Simple VBA Excel to EA importer v3

 

There is an updated version available. Check out Excel to EA Importer v4

The Excel to EA importer is a rather simple tool to import stuff into EA.

It has been available on the Sparx Community Site since 2009 and it has always been one of the most popular resources.

Version 2 was a small improvement allowing for different types of Elements.

In version 3, thanks to the kind help of Paulus, I’ve now added a new function in order to import Glossary Terms.

The excel file now has two tabs, one to import elements and attributes, the other to import the glossary terms

excel tabs

Free download

[ecwid_product store_id=”6824265″ product_id=”48071402″]

Elements and Attributes

Columns A till F are used in the sheet ElementsAndAttributes . Fill in the the columns with your own data.

  • Type
    Fill in the type of the Element you wish to import. This column should contain either Attribute or one of the EA Element types as defined in the documentation of EA.Element.Type. An attribute will be added to the last specified Element.
  • Name
    The name of the element or attribute.
  • Stereotype
    The stereotype of the element or attribute. Use null to specify an empty stereotype.
  • Description
    The description of the element or attribute.
  • Attribute Type
    The type of the attributeThis column should not be used for Elements. Use null to specify an empty type.
  • Attribute Length
    This value will be added as a tagged value with the name length on the attribute.  Again this is only for attributes.

Glossary

In the 2nd sheet Glossary you can fill in columns A until C with:

  • Term
    The term name is mandatory.
  • Type
    The type of the term is mandatory as well
  • Meaning
    The meaning of the term is optional.

Import

Once all you data has been filled in you are ready to import the data into EA.

  • Open the sheet you wish to import
  • If you are on the ElementsAndAttributes sheet press the button Import, or run the macro (Alt-F8) importFromExcel
  • If you are on the Glossary sheet press the button Import Glossary, or  run the macro (Alt-F8) importGlossaryFromExcel

excel buttons

Customizing

The code of this little tool is embedded as VBA in the document, and as such can be edited by anyone with basic programming skills.

To open the code editor press Alt-F11.

There are three major parts for the code

  • ExcelImporter
    The module that contains the importFromExcel macro. This is where you want to make changes.
  • EAConnector
    A facade for EA’s API containing all kinds of useful functions. You probably don’t need to change anything here.
  • ExcelConnector
    A facade for Excel with the code to get the values of the sheet. Again probably no need to change anything here.

Both the Excel file as the VBA code embedded in it is free for use. Just be kind and leave the reference to my name in the code if you use it.

Simple VBA Excel to EA importer v2

There is an updated version available. Check out EA Excel Importer V4

The Excel to EA importer is a rather simple tool to import stuff into EA.

It has been available on the Sparx Community Site since 2009 and it has always been one of the most popular resources.

Now I decided to improve it a little bit and publish version 2.

Download

Download the excel file here: EAExcelImporter_v2

Usage

Columns A till F are used in the sheet. Fill in the the columns with your own data.

  • Type
    Fill in the type of the Element you wish to import. This column should contain either Attribute or one of the EA Element types as defined in the documentation of EA.Element.Type. An attribute will be added to the last specified Element.
  • Name
    The name of the element or attribute.
  • Stereotype
    The stereotype of the element or attribute. Use null to specify an empty stereotype.
  • Description
    The description of the element or attribute.
  • Attribute Type
    The type of the attributeThis column should not be used for Elements. Use null to specify an empty type.
  • Attribute Length
    This value will be added as a tagged value with the name length on the attribute.  Again this is only for attributes.

Once all you data has been filled in you can either run the macro (Alt-F8) importFromExcel or press the Import button

Customizing

The code of this little tool is embedded as VBA in the document, and as such can be edited by anyone with basic programming skills.

To open the code editor press Alt-F11.

There are three major parts for the code

  • ExcelImporter
    The module that contains the importFromExcel macro. This is where you want to make changes.
  • EAConnector
    A facade for EA’s API containing all kinds of useful functions. You probably don’t need to change anything here.
  • ExcelConnector
    A facade for Excel with the code to get the values of the sheet. Again probably no need to change anything here.

Both the Excel file as the VBA code embedded in it is free for use. Just be kind and leave the reference to my name in the code if you use it.