Using the Excel_Import.xem
Instead of writing my VB code for every different excel sheet and/or model type…
… i recently started using the XEM Excel_Import!
Lets give it a closer look about the whys and specially about the HOW.
Assume you have different models, say CDM and PDM and you want to import a xls source like that:
and you can import this table without coding as a cdm, pdm or whatever it fits model!
Yes, you want this feature, but how ?
Just add the model extention Excel_Import.xem to your model
(menu model:extentions, in the dialog select attach extention and you´ll find it on the tab import!):
Now you can use it by right clicking on the model name and selecting Import Excel File:
in the dialog, select a file, leave the options unchanged for now and press next:
as you see then in the selection box, there are all CDM model specific Attributes available:
but even when we want to create an entity, our excel list is a list of entity attributes!:
now step by step associate the excel columns with some attribute:
fieldnumber i put in description because i am interested about the order later (or not: then deactivate the button Import column)
But to get an Entity object we HAVE TO associate the entity/table whatevername with the <parent> object so our list of attributes gets a father:
the other attributes: fieldname i put onto name or code , fieldtype on datatype and so on
the second table i dont want for now, so i deselect it and next, the import starts and :
here we are!
try the same with a PDM import its working !!!
PS: please rate this, cos i wanna know if its worth to continue