Book a Demo

Author Topic: Importing Table Definitions from a Spreadsheet  (Read 6442 times)

Duane Colley

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Importing Table Definitions from a Spreadsheet
« on: October 09, 2014, 01:34:58 am »
Hi All

Using EA 10, is there a way to mass import table/column definitions into a Data Model Diagram from a spreadsheet.  Database doesn't exist yet.

Spreadsheet would be typical layout.
table name, column name, type, precision, scale.

Thanks.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Importing Table Definitions from a Spreadsheet
« Reply #1 on: October 09, 2014, 04:06:34 am »
A couple of ways: a) use the VB/Java script that comes with EA and adapt it. b) use Geerts importer. c) Use eaDocx.

q.
« Last Edit: October 09, 2014, 04:06:46 am by qwerty »

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Importing Table Definitions from a Spreadsheet
« Reply #2 on: October 09, 2014, 10:54:28 am »
RE: using scripting to import CSV (option 'a' mentioned by qwerty) -

Enterprise Architect includes scripting libraries to assist with writing your own custom CSV Import/Export functions using EA's automation and scripting interface.  These libraries allow much greater control over CSV import/export (E.g. import/export of attributes, operations, connectors, etc).  Scripting is available in EA Corporate edition or higher. See the "Scripting" topic in EA help for details. The CSV scripting library can be found under Tools | Scripting > EAScriptLib > JScript-CSV.

You can find some import and export script examples on the following pages:
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1396310555/0#1
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1396913036/0#1

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Importing Table Definitions from a Spreadsheet
« Reply #3 on: October 09, 2014, 05:26:40 pm »
For option b) see Simple VBA Excel to EA importer V3

It works out of the box for table name, column name and column type.
You'll have to adapt the VBA code a bit to include precision and scale, but that should be less then two hours of work.

Geert

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Importing Table Definitions from a Spreadsheet
« Reply #4 on: October 09, 2014, 05:27:29 pm »
So now we just need a reply from Ian about option C  ;D

Geert

Ian Mitchell

  • EA User
  • **
  • Posts: 507
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Re: Importing Table Definitions from a Spreadsheet
« Reply #5 on: October 09, 2014, 08:34:49 pm »
Oh - so I'm allowed to answer a question with 'use eaDocX' am I?  ;)
Normally I get abuse when I do that :)
Geert's right - I can also be done - bi-directionally - with the Excel support in eaDocX.
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Importing Table Definitions from a Spreadsheet
« Reply #6 on: October 09, 2014, 09:53:01 pm »
Quote
- I can also be done -
Well done ;D

q.