Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: EA_enthusiast on December 28, 2020, 04:54:16 pm

Title: Excel import/export the "Initial Value" field under "Attributes
Post by: EA_enthusiast on December 28, 2020, 04:54:16 pm
Hello, EA experts

I am trying to import/export (from and to Excel) the "Initial Value" field under "Attributes (among other fields of course). I am using this field to show a range of values (as shown in the screenshot)

https://ibb.co/gvzK2cb

How can I import/export the "Initial Value" field?

This does not seem to be possible using Bellekens tool and I tried to do so using MDG Integration for Office but I failed.

Thank you in advance.
Mo
Title: Re: Excel import/export the "Initial Value" field under "Attributes
Post by: Geert Bellekens on December 28, 2020, 06:42:12 pm
You need to include
Code: [Select]
a.Default as InitialValue in the export query in the configuration tab to add include the initial value in the export.

Geert
Title: Re: Excel import/export the "Initial Value" field under "Attributes
Post by: EA_enthusiast on December 29, 2020, 03:47:09 am
Hello, Geert,

Again, it seems that your tool is always the solution  :)

I don't have experience dealing with queries.

Where exactly should I add this line? at the end of the query (just copy and paste) or should I delete a line from the query and replace it with this line?

This is what I did...

https://ibb.co/C8HLdpL

But I must have done something wrong because I got an error message

https://ibb.co/MNLTZpw

Thank you!
Mo
Title: Re: Excel import/export the "Initial Value" field under "Attributes
Post by: EA_enthusiast on December 29, 2020, 06:45:21 pm
I would appreciate the help in editing the export query
Title: Re: Excel import/export the "Initial Value" field under "Attributes
Post by: Geert Bellekens on December 29, 2020, 11:23:09 pm
The query is a union between the part for the element, and the part for the attributes.

Both queries should contain the same amount of fields to be unioned.

Add a.Default as InitialValue to the select list of the attribute part, and '' as InitialValue to the select list of the element part.

Geert

Title: Re: Excel import/export the "Initial Value" field under "Attributes
Post by: EA_enthusiast on December 30, 2020, 05:16:34 am
Thank you so much, Geert! It worked  :)

I assume that after exporting, I can update the Excel sheet and add more rows as needed, then import it again.

Thank you very much again!
Mo