Excel importer add-on
4 min read
last updated: 07/13/2023
Convert a single MS Excel file with XLSX extension or CSV(experimental) to a ReqIF Archive file (.xlsx to .reqifz)
Start the Excel Importer add-on by selecting Add-ons > Excel add-on.
Sheet Configuration tab
Step 1. Sheet selection
display the specific sheet to configure, check Ignore Sheet to skip conversion
Step 2. Set header row
select a header row that represent the attributes (table header)
Set import data range
Set the first and last cell coordinate of the converted worksheet section
- Row is row in the excel sheet (1-1048576)
- Column represents the number of column in the excel spreadsheet (A=1, B=2… XFD=16384)
Step 3. Configure Attributes (center)
Column represents the number of column in the excel spreadsheet (A=1, B=2… XFD=16384)
Name represent the Header Row Number from the Set header row section,
To ignore a column from import check the box near
Data type. Tool will try to guess the data types automatically based on the data type of the first row of the import range.
- Boolean – true/false type values
- Integer – whole numbers
- Real – decimal numbers
- Date – date format
- String – single line text, no formatting
- Text – multi line text with formatting
- Enumeration – values can be one or more of a fixed set of values in all the rows in a sheet. Single value if no separator is found. Multi value if separator is found [ , ; newline ]. The conversion will combine all values found in all the rows within a single sheet so it can be memory intensive if overused
Specify the date format that appears in excel. If it cannot be detected automatically this format will be used to parse the date.
For date type it is possible to define a default date, if date is not set in the Excel cell. To set the Default date please edit “ExcelImport.exe.config” in AddOns/Excel folder. Set the config value “DefaultDate” to the date you want (format YYYY-MM-DD) and set the EnableDefaultDate to “True”.
Note: if the conversion is taking long use Integer ( instead of Real ) and String (instead of Text types)
Reference Shows the first data from the table
Step 4. Set main column
Set the type of ReqIF attribute of the imported excel data in the main column
- ReqIF.ChapterName – only Text type attributes
- Level ID – only Integer type attributes, ReqIF.ChapterName must be already selected
- ReqIF.Text – only Text type attributes
Step 5. Set ID field
To enable Excel – ReqIF round trip, use Save config and save the config file on your computer.
To reimport an Excel document you click on Load config with the saved Config file from the previously saved.
You must select an ID field from the Excel file, if the section is active. The data type of ID Field must be Integer.
Note: The ID cell must have unique value on each excel workbook, to be possible automatically identification of the specific data row.
Details on the roundtrip: the activation of the Roundtrip configuration forces the application to use the stored ReqIF-IDs in the configuration file during the reimport of a “known” Excel file. So the resulting ReqIF file will have identical IDs for all attributes and data rows. ReqEdit ReqIF compare will be possible this way and also the import in an external RE tool will update existing content instead of recreating it.
Not activating this optional functionality, the new ReqIF file will be generated with new randomly generated IDs.
The tool lets the user save file conversion configurations and reuse them later. This is done with the SAVE / LOAD CONFIG buttons.
Preview the data range of each sheet with the configured header row by pressing the EXCEL SHEET PREVIEW tab.
Use the preview to check import settings periodically, the list can be adjusted to show the start or the end of the range and also the number of the preview rows.
Importing Excel to ReqIF
After the excel file is configured press IMPORT to start the conversion.
The tool will generate a reqifz file near the source xlsx file. All actions are logged.
Each conversion will overwrite any previous REQIFZ files in the original directory
All generated output is REQIFZ archive format and will be saved near the original document.
Important Note: please check the content of the imported ReqIF file against your original Excel! Because of the Excel format we cannot guarantee a loss free import of all data.
All conversions are logged into the application directory /logs folder. The log files are splitted into 10mb files and rotated when needed.
The logging uses the log4net library. Experienced users can configure the file log4net.config to suit the logging needs. Documentation log4net: https://logging.apache.org/log4net/release/manual/introduction.html
Only the XLSX format is supported
Additional content will be discarded (images, charts or any other floating elements)
Marcos are not processed
Pivot tables are not supported
Some formulas are not supported (specially formulas regarding to other cell or table references or named labels)
Merged cells will be converted to the first cell the merge starts horizontally or vertically