Importing Data from Excel to CodeBeamer #543510/v2424 |
Tags:
not added yet
Table of Contents
![]() ![]() Importing Data from Excel Files to CodeBeamerCodeBeamer Excel import functionality allows you to import data from an Excel file. The major features of this import is:
Gettings started: preparing your dataBefore importing some Excel data-file it should conform to following rules:
During the import the wizard will try to automatically pair the header-names in the Excel sheet to the closest matching field name in the target CodeBeamer Tracker. So if your names in the sheet match then the configuration will be much easier for you. First steps: Importing to a TrackerSo to start importing to a Tracker go to the Tracker, and from the "more" menu choose Import...The import wizard will start up, and you can walk through the wizard pages and configure the details in there. Click on "Attach file" to choose and upload the Excel file. You can also drag-drop file from file-system here (some browsers does not support that however).
Click on next to start importing... Mapping data to CodeBeamer fieldsOn the second page of the wizard you have the option to map the cell-data coming from the Excel sheet to the fields of the CodeBeamer issue/bug/requirement that will be created from that data.The data will be handled as:
The bottom part of this page of the wizard also shows you the sample of raw data found in the Excel sheet. This allows you to check if the correct data is being imported, and also decide about which Tracker field should the data loaded into.
Above each sample-data column you will see the list of fields of the issues in the Tracker. These might be the standard fields provided by CodeBeamer or your customized fields in this Tracker. From each field-list you can:
Note: that import wizard tries to automatically figure out the mapping for you, by using the header text that is "closest" matching to the fields' names. That is acceptable most times, but carefully review and adjust mapping if necessary. Default date and number formatsAs the date and number format of your Excel data might be variying (depending on your country's customs), you can set the default date and number formats on this second page too.
Importing hierarchiesImport can build a hierarchy (a tree) of items from the import data. This hierarchy is built from a column which contains indented data. The indentation levels will be used to determine the parent-child relationship of the items. Use Excel's indent button to add indentation in a cell or use tabs in CSV files for building hierarchies. For example if the "name" column contains this data in this indentation: APPLE BANANA PEACH PLUM Then the 4 created issue will be in the same parent-child hierarchy, i.e. the BANANA will be child of APPLE and PLUM will be child of PEACH Like this: APPLE └── BANANA PEACH └── PLUM
Special mapping: importing commentsThere are two special fields also appear in the mappings selection, which are the "Comment" and "Comment Format" fields. See highlighted here:
If a data is mapped to the "Comment" field that will be added as a new comment to the issue being created from that row ! This is a very convenient way to add also comments to the issues. The "Comment Format" field is specifying the format of the "Comment" being added. The possible values are "W" for "Wiki", "H" for HTML, and "P" for plain text. If the Comment Format is not specified the comment is added in plain text format. Data conversions optionsAs you have mapped the incoming data to fields of the issues of the target Tracker, the importer will try to load that data into the field using some smart defaults. For example it tries many date format for date fields. Other example is that it looks up the users by their account name if the data is mapped to the "assigned to" field.Yet sometimes the conversion may fail, but for such cases you can select some default values. You can:
There is lot more conversion options than this, see section Previewing convered import data and correcting problemsAs the last step of the import wizard shows you the converted data - after all configured conversions are applied- and also tries to write that data to the mapped columns.Important: that at this time no issues at all created, so if you would cancel the process there would be no changes whatsoever. So the preview page shows the converted data, and if there are conversion or mapping errors then it higlights those cells where that happened. Also that should provide an information message which should contain enough detail to correct the problem. Mostly the problems are:
If problems are spotted you've the option to go backwards in the wizard: use the "back" button to go back and for example change the mapping or conversion. Alternatively if the problems are rare or not sever then you may want to go forward. Then the importer will try to create the issues anyway, and for any failed data loading either result in that an issue will be missing or some of those fields will be empty. Finally: creating issues and reviewing themSo after finishing the import the importer will print out the number of issues created, and also will print out links to those issues. That is advisable that you double check the created issue-data, and spot for possible conversion errors for completeness of your data.For easier review you have the option to tag the imported issues during import. This option appears on the last page of the import wizard, and if the tag name is not empty then all issues will be tagged with that. For creating a private tag add a "#" prefix to the tag name. An example:
Data conversionsFollowing section describes the data conversions in detailsData conversion smart defaultsWhen importing from Excel the importer tries to convert the data smartly, and it does try several smart ways to convert the incoming data. This conversion takes account the target field's type. Following table summarizes this:
Other specialities:
Advanced data conversionsIn some cases the data needs some more advanced conversion, because it is not matching with the default conversion rules built into the importer. In such cases you can add some small scripts to do additional conversion. For that click on the "Configure advanced conversions" text which opens the following view:
The rules are:
Advanced JavaScript conversionOne most powerful option is to use a small JavaScript for data conversion. That is activated by selecting "ScriptConverter" from the select box in each mapped field. The previous screenshot shows an example. For a detailed Javascript reference click here Use a script to do the conversion. The script's return value will be used as result of the conversion. This script can use following variables:
Few examples of conversion JavaScripts:
Test Case and Test Step importAs CodeBeamer supports Table fields in Trackers, importer has some advanced support for importing data into such fields. Table field is a special field type, which means that the field contains a tabular data with named columns, and that can contain several rows. A typical example of that is the Test Case's "Test Step" field which is a table field with 3 named columns, which are the "Critical", "Action" and "Expected Result" columns. For example:
When you want to import data to such Table fields you have the following options:
In the followings here we provide some examples. Mapping Table fields' columns to Excel dataNo matter which conversion is applied later first you will have to map the Excel cells to the Table fields.Assuming that you have an Excel sheet which contains one column which contains the Test Steps in HTML table format. Here is the sample Excel file downloadable testCasesWithSteps.xls. This screenshot shows the column which contains the HTML table we want to import into the "Test Steps" field. The "F" column contains the HTML table with the data:
The Table fields also appear on the mapping page of the import wizard. These appear on as separate fields like: "Test Steps.Action" and "Test Step.Critical" and "Test Step.Expected Result in the field list. By mapping them to a column you can load the column's data into the Table fields! Because the cells in this "F" column contain all data for "Test Steps" we have to map all columns of "Test Steps" table to this single Excel column. This can be achieved by selecting multiple elements from the field list. Use CTRL-click to select multiple elements. Here is how it should look like after proper selection:
Converting HTML table data to Table fieldAfter the HTML table is mapped to the Table field on the next wizard page we need to configure which part of the HTML table goes to which field. This is done by selecting the "OneColumnFromHtmlTableCellLoader" converter. This converter will extract one column from the HTML table, and puts it to one column to the "Test Step" table cell. For example if this is the HTML table in our Excel cell:
Then you want to extract the 0th column (red) and map to the "Action" field, extract the 1st column (green) and map to "Expected field", extract the 2nd column (blue) and map to "Critical" field. This extraction is configured as the following screenshot illustrates (config is indicated by the matching color):
Reviewing if mapping and conversion is correct for Table cellsIf the field is correctly mapped and the column is correctly extracted from the HTML table the preview page of the import wizard should show something like this:
Specialized Converters for Table fieldsIn the previous example we've shown the OneColumnFromHtmlTableCellLoader which extracts one column from an HTML formatted table. There are few additional converters, and as last resort you can always use a JavaScript script using ScriptConverter "Splitter" table converterSplitter converter can split the input data from the Excel cell to several smaller sub-parts. This is useful if your table cell has such content:apple|banana|peachAnd you want to load that into a Table field like this:
This case you should use | character as delimiter, and map the result to the "fruit" column in the Table field. An example shot for this converter:
"OneColumnFromCSVCellLoader" table converterThis is similar to the HTML table converter, but instead of a HTML table it can extract data/column from a CSV data So your data in cell is a CSV like: fruit;price apple;10 banana;20 peach;5 Then you can extract the "fruits" from this data using ";" as CSV separator, and by mapping the 0th column to the "fruit" Table cell, and 1st colum to the "price" Table cell. An example:
"OneColumnFromHTMLTableCellLoader" table converterProbably the most useful converter is which we've seen in the above example. This extracts columns from a HTML table which can be mapped to columns in Table cells. |
Fast Links
![]() codebeamer Overview codebeamer Knowledge Base Services by Intland Software |
This website stores cookies on your computer. These cookies are used to improve your browsing experience, constantly optimize the functionality and content of our website, and help us understand your interests and provide more personalized services to you, both on this website and through other media. With your permission, we and our partners may use precise geolocation data and identification through device scanning. You may click accept to consent to our and our partners’ processing as described above. Please be aware that some processing of your personal data may not require your consent, but you have a right to object to such processing. By using our website, you acknowledge this notice of our cookie practices. By accepting and continuing to browse this site, you agree to this use. Your preferences will apply to this website only.
Note that user-behavior analytics are being captured on this server to improve the Codebeamer user experience.