# Load enumeration from file

**URL:** <https://forums.visual-paradigm.com/t/load-enumeration-from-file/17638>\
**Category:** UML\
**Created:** [July 21, 2022, 9:30am UTC](https://forums.visual-paradigm.com/t/load-enumeration-from-file/17638 "2022-07-21T09:30:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ymitsos](https://avatars.discourse-cdn.com/v2/letter/y/4bbf92/32.png) [@ymitsos](https://forums.visual-paradigm.com/u/ymitsos)\
**Post date:** [July 21, 2022, 9:30am UTC](https://forums.visual-paradigm.com/t/load-enumeration-from-file/17638/1 "2022-07-21T09:30:33Z")

</div>

Hi,

I was wondering if there is a mechanism for loading the enumerations literals from a text file. There are cases where the literals of a class are quite lengthy and such a mechanism would help. Or we might want to model an attribute, of a class, to get values from a list contained in a text file.

To give an example, consider an attribute referring to a country name. We either want to preload the countries’ names from a text file or alternatively link this attribute to an external entity called country\_names.txt.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![Rain](https://forums.visual-paradigm.com/user_avatar/forums.visual-paradigm.com/rain/32/2309_2.png) [@Rain](https://forums.visual-paradigm.com/u/Rain)\
**Post date:** [July 27, 2022, 9:41am UTC](https://forums.visual-paradigm.com/t/load-enumeration-from-file/17638/2 "2022-07-27T09:41:26Z")

</div>

I’m sorry that we do not support loading enumeration literals from text file. But you can make use of our Excel data import feature to achieve. You can try create a simple Enum in our application and export it to Excel. After that follow the structure in exported Excel to feed in your data, and import it back to the project. Hope this can help.

Best regards,  
Rain Wong

---

<div class="post-metadata">

**Author:** ![Bjarredsbon](https://avatars.discourse-cdn.com/v2/letter/b/e36b37/32.png) [@Bjarredsbon](https://forums.visual-paradigm.com/u/Bjarredsbon)\
**Post date:** [January 26, 2023, 4:47pm UTC](https://forums.visual-paradigm.com/t/load-enumeration-from-file/17638/3 "2023-01-26T16:47:27Z")

</div>

Hello,

I have a class diagram where I have added an Enumeration “MyEnum”. Then I added two literals “Value1” and “Value2”.

In another class I added an attribute “MyAttribute : MyEnum” and all seems ok.

But when I export a class diagram to excel, there is no trace of the enumeration classes. I see the attribute “MyAttribute1” of type “MyEnum”, but I cannot see the enumeration literals of MyEnum. How can these be exported? I currently use VP 16.3

Thank you
