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.

Published by

Geert Bellekens

Freelance UML and Enterprise Architect consultant

27 thoughts on “Simple VBA Excel to EA importer v2”

  1. Good utility to have. I was curious if an export utility also exists to export Class and its attributes? I am trying to export and it appears EA export/Import utility wont export class attributes. Can you help please.

      1. Thanks for the quick response Geert.
        But I am new to EA and also have no VBA experience. If you could please provide details of the functions available or where can i find them, I could then try to write one.

        Thanks for your help.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s