The standalone SystemWeaver Excel Import application enables users to perform simple imports of new items into a "container item" in SystemWeaver from MS Excel. Using the tool, imports of items are done row-by-row, which allows for import of only one "child" (part) per level and part type. There is no limit on the number of levels, i.e., the depth.
|Note: The tool does not support updating existing items in the database. It also cannot be used for importing attribute nodes, e.g., test results.|
As the Excel Import application is not a core product, we provide it to customers when it fits a customer's needs. This article provides an example of how to import using this tool.
- Setting the Container Item
- Selecting the Excel sheet
- Mapping the Item Types
- Mapping Part Types
- Mapping Attributes
- Saving the Import Config
- Starting the Import
- Access to a SystemWeaver database
- A container item has been created for the import
- An installation of SystemWeaver.ExcelImport.exe compatible with the SystemWeaver server application
- Consider first testing the import in a test library or a test environment
- Familiar with the meta model related to the import
- If mapping values to attributes, the attribute types must exist for the given item type
Start by opening the application, and logging in.
Setting the Container Item
Start by entering the SystemWeaver container item id.
- Copy the existing SystemWeaver "container" item for your import.
- On the Import form, paste its xID to the Container item id field. This item is considered the "parent" or container for the new items that will be creating via the import. Enter either the entire SystemWeaver URL or only the item ID, e.g., url:swap://sys7:1345/x04000000000B7BC8 or x04000000000B7BC8.
The imported items can be moved afterwards if needed.
Selecting the Excel sheet
The next step is to identify the MS Excel Sheet to import.
- In the File field, browse out and select the Excel file containing the items to be imported. A preview of Sheet 1 in your file will display by default.
- Select the row number that contains the First row of data. Typically this is row 2 since row 1 often contains column headers.
Mapping the Item Types
We recommend that you 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 the item name column for each item type in your import file to item types in the server. 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 - Requirement container, Function requirement, and Legal requirement. Column A contains the name values for Requirement container items, Column B contains the name values for Function requirement items (parts to Requirement container), and column D contains the name values of Legal requirement items (parts to Requirement container).
- Click Add item mapping. 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.
- Click OK to add the mapping to the configuration.
- Repeat steps 1-5 for each item type in the Sheet to be imported.
The item type SID has been added to the tree grid for quick reference during configuration. . Below, you can see how the 3 item type mappings have been configured.
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 this (top) item type in your import file as a part of the container item.
- 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.
The part type SID has been added to the tree grid for quick reference during configuration.
Below, you can see how the 3 part type mappings have been configured per the meta model. The top item Requirement container in the import is mapped as a part of the container item (Software component). Both Function requirement and Legal requirement items are configured as parts of Requirement container.
If you want to map further information from the spreadsheet, you can map it to existing attribute(s) for the new items.
|Note: Currently, the tool only supports mapping item attributes, not part attributes.|
- Click Add attribute mapping. The Add attribute mapping dialog will display.
- For Item column, select the column that contains the name values for the item type having the attribute you want to map the values to.
- 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.
The data in column F will be imported to the attribute with SID 'CMTT'. The attribute is on the Legal requirement item type.
Note: The ExcelImport tool will only allow for the import of enum attributes with Single Dimension, i.e., single value occurrence. Also, if importing to an enum attribute, be sure that your data matches the attribute's validated list of values, 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. This default config will load each time you open the application.
- Click Save config as to save the configuration as a .config file which you can load for future use by clicking Load config and selecting 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.
- Once your import is complete, you can then find the newly created items in the database and make edits as needed. The container item's description will contain a log of the import. Any problems with the import will be noted there as well.