I have an excel document artifact which I have uploaded as a Internal document and associated to requirement element. Is it possible to embed this document as an attachment when using the option "Generate Documentation"?
-
1By "internal document," do you mean a linked document? And what do you mean by "attachment"? – Uffe May 31 '16 at 11:48
-
By Internal document I mean --> while drag and drop of my local excel to diagram --> Artifact (Internal) and By attachment I mean...after the system generates a word document, the artifact is just shown as a picture, but I expected the Artifact (excel) embedded in te generated word document. Hope this is clear now. – user6404406 May 31 '16 at 12:29
-
I have no idea whether the tool eaDocX can do that, but you might have a look into that. – qwerty_so Jun 01 '16 at 18:12
1 Answers
To my knowledge there is no way to include the contents of an "internal" artifact in an RTF template.
What EA does with this type of content, I believe, is to store it as a binary blob in its database and then, when you double-click the artifact in a diagram, unpack it and launch it to the appropriate external program as defined in the Windows registry (based on the file extension).
But this is a generic function that works for all file types, and EA does not decode the contents -- which it would need to do in order to include them in a generated document, because what actually gets generated is RTF code.
What you could do instead is create a linked document. These are stored in the database in RTF format and so can be included in RTF templates.
Any EA element can contain a linked document. Simply right-click it and select Linked Document. You can also create a "Document" artifact in the "Artifacts" diagram toolbox; linked documents are created automatically for these.
You can copy the contents of your Excel spreadsheet into the linked document, but you need to take care with the formatting as EA doesn't auto-format the document for you.
In order to get the linked document contents out in a generated document, open the RTF template and select the Element
/ Linked Document
section. The built-in "Model Report" template also includes linked documents.

- 10,396
- 1
- 33
- 40
-
In theory I guess you could also create a document script fragment that gets the Excel contents and converts it to RTF. The advantage to this approach would be that you can leave the excel file as an actual excel file while still being able to report on it. But it would take a non-trivial amount of code to do so. – Geert Bellekens May 31 '16 at 18:12
-