The standalone SystemWeaver Excel Import application enables you to perform imports of items from a Microsoft Excel spreadsheet into a "container item" in SystemWeaver. As this application is not a core product, we provide it to customers when it fits their use cases. This article describes how to use the tool and the types of imports that it supports.
- Setting the Container Item
- Selecting the Excel sheet
- Mapping the Item Types
- Mapping Part Types
- Mapping Attributes
- Saving the Import Config
- Starting the Import
Prerequisites
- "Write" access to a SystemWeaver database
- A container item has been created for the import.
- An installation of SystemWeaver.ExcelImport.exe compatible with your SystemWeaver server
- Familiar with the meta model related to the import
- If mapping values to attributes, the attribute types must exist for the given item type.
- All columns must contain true values, i.e., formulas are not supported.
- For editing existing items and/or importing multiple parts of the same type, SystemWeaver version Sävenäs (R47) or later is needed. Earlier versions of the tool do not support updating existing items in the database.
Note: It cannot be used for importing attribute nodes, e.g., test results. |
Tip: We recommend first testing the import into a test library or a test environment. |
- Start by opening the application, and logging in to the target server.
Setting the Container Item
You must first provide the xID of the "container" item where you wish to import. The container item is referred to as "Root" in the application.
- Copy the existing SystemWeaver "container" item in your target database for your import.
- On the Import form, paste its xID in the Container Item ID field. This item is considered the "parent" or container for the items that will be imported. Enter either the entire SystemWeaver URL or only the item ID, e.g., url:swap://sys7:1345/x040000000011580C or x040000000011580C.
The imported items can be moved afterwards if needed.
Selecting the Excel Sheet
The next step is to select the Excel Sheet to import. Note that the Excel file must be closed.
- In the File field, browse out to and select the Excel file containing the list of items to be imported.
A "Document loaded!" message will display. - If Sheet 1 is not the spreadsheet to be imported, use the Sheet drop-down to make another selection.
- A preview of the spreadsheet in your file will be shown.
- Select the row number that contains the First row of data. Typically this is row 2 since row 1 often contains column headers.
Available Import Options
Matching
There are three possible matching options for the items to be imported: No match and Match on Name and Match on Foreign id.
No Match
To import items without any matching being done, use the No match option. When this option is selected:
- Items are imported one row at a time.
- Only one child (part) per level and part type is created. This means that parts of the same part type with the same parent results in the creation of multiple, similar parent items.
- This option is ideal for importing a flat list of items e.g., Requirements with no parts, or a list that has multiple levels, i.e., children, grandchildren, etc. There is no limit on the number of levels, i.e., the depth.
Match on Name
To import items with matching on Item name within the spreadsheet and against the structure you import to, use the Match on Name option. When this option is used, the process:
- Checks the textual values in an Item Mapping's Item Name Column
- Items that share the same textual value for the name in the same Item Name Column, but on different rows, will be treated as the same entity.
Match on Foreign ID (Import with Unique Identifier)
To import items with matching on Foreign Id within the spreadsheet and against the structure you import to, use the Match on foreign Id option. This option enables you to:
- Match items using a column containing a unique identifier (Foreign ID) for each item.
- It allows for matching parent items and creating multiple child items for the same parent, provided the children share the same Foreign ID.
Allow Empty Cell
Check the Allow Empty Cell Value checkbox to ignore empty cells in columns which are part of the Item Mappings. When this option is checked. no item with a blank name will be imported.
Mapping the Item Types
Begin by mapping all of the item types, i.e., both for the items and for any items that are being imported as parts.
You do this by mapping an item name column for each item type in your import file to item types in the database. To complete the mapping, you must be familiar with the item and part types relevant to the import.
In the example below, there are three item types in the spreadsheet to be imported: Function requirements, Function specification, and Function requirement.
- Column A contains the name values for Function requirements items
- Column C contains the name values for Function specification items (parts to Function requirements)
- Column E contains the name values of Function requirement items (parts to Function requirements).
Each item also has Description content.
- In the Items Mappings section, click Add. The Add Item Mapping dialog will display.
- For Item Name Column, select the column that contains the name values for the item type you are mapping.
- For Item Type (SID), select the SID of the item type.
- For Description Column, select the column that will map to the Description for the item type.
- For Foreign Id Column, select the column containing the unique identifier. This is only used when you want to match items using that value. If not matching, leave Foreign id column blank.
- Click OK to add the mapping.
- Repeat steps 1-5 for each item type in the Sheet to be imported.
Tip: The item type SID can be added to the tree grid for some example data for quick reference during configuration:![]() |
No Match Example
A flat list with only one item type.
Match on Name Example
The highlighting below shows the three item type mappings that have been set. Matching is being done in the spreadsheet on the name of the items.
Mapping Part Types
Once the item mappings are done, you can move on to the mapping of part types. Even if you are only importing one level of items to the container item, you must map the (top) item type in your import file as a part of the container item called "Root".
- Click Add part mapping. The Add part mapping dialog will display.
- For From column, select "Root" which is the container item for your import.
- For Part type (SID), select the SID of the part type that will connect the top item type in your import file with the container item.
- For To column, select the column that contains the name values for the part in your import file, i.e., the item type that is owned by the item type identified in the From column.
- Click OK to add the mapping to the configuration.
- Repeat steps 1-5 for each part type in the Sheet to be imported.
Example Multiple Part Types
Below, you can see how the 3 part type mappings have been configured per the meta model. The top item Function requirements item in the import is mapped as a part of the container item (Workarea). Function specification is configured as a part of Function requirements, and Function requirement is configured as a part of the Function specification.
Flat List Example (One Part Type)
Below, six items of type RRQ with be created. There is only one part type mapping which is the part connecting the "container" item to each RRQ item. In addition, a Description and an Attribute (REQSO) value is also being imported for each item.
Mapping Attributes
If you want to map further information from the spreadsheet, you can map it to existing attribute(s) on the items.
Note: The tool supports mapping item attributes only, not part attributes. |
- Click Add attribute mapping. The Add attribute mapping dialog will display.
- Select the column that contains the item names (i.e., the item type) to which you want to map the attribute values.
- For Attribute type (SID), select the SID of the attribute you want to map to. Reminder: this attribute must exist for the selected item type in step 2 or the import of the values will fail.
- For Value column, select the column containing the values to import into the selected attribute type.
- Click OK to add the mapping to the configuration.
- Repeat steps 1-5 for each attribute in the Sheet to be imported.
Example
The data in column G will be imported to the attribute with SID 'REQSO'. The attribute is on the Function requirement items (column E).
Note: The tool will only allow for the import of enumeration attributes with Single Dimension, i.e., single value occurrence. Also, if importing to an enumeration attribute, be sure that your data exactly matches the valid values for the attribute, otherwise you will see data errors in the imported items. For example, the value "Approved" is not the same as the value "Approved " (note space after the letter d). |
Saving the Import Config
At any time, you have the option of saving the configuration for later use. It is not required that you do this.
When you are satisfied with an Excel Import configuration, you have two options for saving your settings.
- Click Save config to save changes to the current configuration.
- Click Save config as to save the configuration as a new .config file.
For future imports, to load an existing configuration, click Load config and select it.
You can clear your configuration by clicking Clear.
Starting the Import
When you are ready to import, click Start Import. A message will inform when the import is completed.
The container item's description will contain a log of the import. Any problems with the import will be noted there as well.
Once your import is complete, you can then find the newly created items in the database and make edits as needed.