Description
The ExcelFileReceiver morphs generated data into a formatted Excel file. The Excel file format may be specified as xlsx or xls within the parameter configuration. Additional formatting options are available for specifying the characters used for quoted text, the masking format for Boolean objects, and NULL values within the generated output file.
Note: Test data generation of Excel files is generally slower than the Delimited (e.g., CSV) file format.
In This Article
- Receiver Parameters
- Receiver Attribute Property Keys
- File and Directory Config Tabs
- Permission Denied Error - Linux Users
- Use Case 1 - Generate a User Data Excel File with Capitalized Column Names
Receiver Parameters
The following parameters can be defined for the ExcelFileReceiver. Items with an asterisk (*) are required:
- *path - Defines the location to store the newly generated Excel output file.
- *fileName - Defines the name of the output file.
- uniqueAttribute - Defines a Domain Attribute the Receiver will use to identify a unique value that has already been inserted into the file and prevents it from being inserted twice.
- *quoteTextData - Defines the character to be used for text data that will be contained in quotes (single or double).
- *booleanValue - Defines the format of a Boolean object with a selected mask (true/false, yes/no, etc.).
- *nullValue - Defines the value that will be placed in the output file for a NULL value.
- *type- Defines the Excel file format for the output file:
- xlsx
- xls
Receiver Attribute Property Keys
The Receiver defines two property keys that can be modified on any of its associated Domain Attributes:
- columnName - Defines the column name as it will be output in the delimited file header.
- include - Determines if the Attribute will be included as a column in the output.
File and Directory Config Tabs
The File and Directory Config Tabs are used to configure what event will trigger file/directory creation and the naming configuration for generated files/directories. Please click here for more information on how to use the File and Directory Config Tabs.
Permission Denied Error - Linux Users
During test data generation, a "profiles" folder will be created within a temporary directory to generate the Excel output file. The full path for each operating system is shown below:
- Linux - /tmp/profiles
- Windows - /temp/profiles
Linux users may receive the following error during test data generation if they lack folder permissions. Verify access to the /tmp and /profiles folders.
java.lang.RuntimeException:java.io.IOException:Permission denied
Use Case 1 - Generate a User Data Excel File with Capitalized Column Names
This use case shows how to output Domain Attribute values for user data to an Excel file (xlsx). Each column name in the generated output file will be capitalized.
Receiver Parameters
For this example, all Receiver parameters have been left as their default value. User Data has been entered for the fileName parameter.
Receiver Attribute Property Keys
The id Attribute property key for the example story below has been set to false and will not appear in the generated output file.
The columnName property key has been altered for every Attribute except the id Attribute.