Create objects and multiple associations from Excel Importer mapping

Hi, I want to import Excel file like below and create Mendix objects and multiple associations using Excel Importer mapping. Product A100a is manufactured with 1pc of CP0001, 2 pcs of CP0002, 10pcs of CP0003 and 5pcs of CP0004 for example, and each component is used for manufacturing other products as well. So Product and Component objects should have many to many associations. Also number of components varies for each product. Questions I have: How should I model Component Quantity in this case? Will it not be an attribute or entity, but instead making 10 objects for CP0003 and associate them with Product A100a for example?    Also I am struggling using Excel Importer. I am trying various import settings but not be able to get a desired objects and associations.  I do not know if Excel importer can handle this type of Excel data well, Does anybody help me get this resolved and what the best approach will be, maybe changing Excel data format, changing domain modelling or using parsing microflow and how it looks like?   This might be a very basic questions but appreciate any advice. Thank you
2 answers

In this case: 

  1. Add in each row the product name
  2. This should be your domain model
  3. Create a mapping which starts with Component mapping
  1. Click create  “New template from excel”
  2. Mendix object = main mapping entity > select Component
    Reference to import objects > select reference to product
  3. Columns
    Product > Map to reference component_Product > Attribute Name > Key, only for reference objects
    Component > map to Component/Name > Set as key for main object
    ComponentQuantity > Map to Component/Quantity > no key




Thank you, Rene for your advice. I was previously setting Product as Mendix object and Component as Reference to import objects. Now my app output looks much better, but still has an issue. From Product List View widget (Data source: Product), only Product A101a is shown in the above case. It seems that all Components of Product A100a are included in Products A101a too, associations of those Components for A100a are overwritten with those with A101a. I tried to set Data handling to Apend (Default is Overwrite), but the result is same. Do you have any idea to get this resolved?

Thank you in advance.