Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: sandi on March 22, 2004, 04:54:06 am

Title: Importing data from MS Excel
Post by: sandi on March 22, 2004, 04:54:06 am
Hi all,

does anyone know how to import data from Excel to EA?

For example, I would like to create requirements (for each row in Excel) and put in the required data from Excel columns.

For example, column A in the Excel contains the short description value in EA, column B in Excel contains tag of the requirement in EA, column C contains Details in EA,...

Thank you,
 S.
Title: Re: Importing data from MS Excel
Post by: Bruno.Cossi on March 22, 2004, 05:25:53 am
You could certainly do it by opening the .eap file directly in MS Access (.eap file is an MS Access database) and importing the data into the t_requirements table.
If you use DB repository then use whichever tool you use for administering your database.

Does this help?

Bruno
Title: Re: Importing data from MS Excel
Post by: thomaskilian on March 22, 2004, 05:40:03 am
Hi sandi,
if you don't have ACCESS (like me) you could use a small VB macro to move data from Excel to Access via the jet engine. You will find examples on the internet how to do this.

Cheers,

Thomas
Title: Re: Importing data from MS Excel
Post by: sandi on March 22, 2004, 05:49:32 am
Wow, thanx Bruno for a quick reply!

I've opened the eap file in MS Access. It seems, that I can't find the table named t_requirements even that I have quite a few of them (requirements) in the EA project (that is in this eap file). The closest name is t_requiretypes. :(

@Thomas: Great, thanx a lot! Will start looking right now for these examples. :)

Thank you guys,
 S.
Title: Re: Importing data from MS Excel
Post by: Bruno.Cossi on March 22, 2004, 05:51:59 am
Hi Sandi,

sorry, my mistake - the table you need is called t_object. Look for the rows with Object_Type = 'Requirement'

Let me know if you need more help with this!

Bruno
Title: Re: Importing data from MS Excel
Post by: sandi on March 23, 2004, 01:58:10 am
Hi Bruno,

I'm trying to copy/paste data from MS Excel into MS Access, t_object table, or even try to add any new record manually - no luck.

If I try to add a new record in this table, I get the error "Index or primary key cannot contain null value". Strange is, that this (index) field is autoincrement (AutoNumber),  therefore it should work, but it doesn't. :((

What should I do?

PS: I hope it's not related to other table dependency, t_attribute, t_package,...

Thank you very much for your help,
 S.
Title: Re: Importing data from MS Excel
Post by: Sean Kearon on March 23, 2004, 03:23:43 am
Would the CSV import/export facility do what you want Sandi?  I've never used it, just a thought really.  Right-click a package in the project explorer and go to Import/Export then CSV Import/Export.

Sean
Title: Re: Importing data from MS Excel
Post by: Bruno.Cossi on March 23, 2004, 05:17:45 am
Hi Sandi,

yes, I forgot - it is related to t_package (column package_id). You need to put here id of a package into which you want to your requirements to be saved.

Bruno

Quote
Hi Bruno,

I'm trying to copy/paste data from MS Excel into MS Access, t_object table, or even try to add any new record manually - no luck.

If I try to add a new record in this table, I get the error "Index or primary key cannot contain null value". Strange is, that this (index) field is autoincrement (AutoNumber),  therefore it should work, but it doesn't. :((

What should I do?

PS: I hope it's not related to other table dependency, t_attribute, t_package,...

Thank you very much for your help,
  S.

Title: Re: Importing data from MS Excel
Post by: Bruno.Cossi on March 23, 2004, 05:20:53 am
Sean,

good point! I have forgotten about that as I have never used it myself - just looked at it and it seems like it could do the trick!

Bruno

Quote
Would the CSV import/export facility do what you want Sandi?  I've never used it, just a thought really.  Right-click a package in the project explorer and go to Import/Export then CSV Import/Export.

Sean

Title: Re: Importing data from MS Excel
Post by: Sean Kearon on March 23, 2004, 05:34:47 am
Nice one...now I understand what the feature is for from reading your thread :)
Title: Re: Importing data from MS Excel
Post by: sandi on March 23, 2004, 06:45:26 am
Oh yeah! This one works perfectly. Thx Sean.

Another question, please. I'm using Keywords field for searching for certain string. Is this field ment for this or will I destroy something in EA if I use it for this purpose - can't find anything useful in help file.

Thank you again guys!

Rgds,
 S.
Title: Re: Importing data from MS Excel
Post by: thomaskilian on March 23, 2004, 07:42:14 am
This is what the help says:
Keywords -  A free text area that may be filtered in Use Case Metrics and Search dialogs - typically used for keywords, context information etc.


hth

Thomas
Title: Re: Importing data from MS Excel
Post by: sandi on March 24, 2004, 12:15:35 am
omg,

I missed that. Don't know where I was looking - I found that under 'General Settings'.

ehhh, sorry for this one :(
Title: Re: Importing data from MS Excel
Post by: thomaskilian on March 24, 2004, 03:58:26 am
No matter - that happens to me also.

Cheers, Thomas
Title: Re: Importing data from MS Excel
Post by: rvrivera on April 14, 2004, 05:38:30 pm
Is possible to import packages using a CSV import/export facility?

Thanks in advance.
Rubén

Quote
Would the CSV import/export facility do what you want Sandi?  I've never used it, just a thought really.  Right-click a package in the project explorer and go to Import/Export then CSV Import/Export.

Sean