Overview
You can programmatically access the actual name of the source Excel worksheet and use it as a field value in the destination.
Example
If you are extracting data from an Excel file and loading it into a database while accessing the worksheet by using a 1-based index (not by name), you still might want to use the actual source worksheet name as a value for one of the fields in the destination table.
Process
You will need to use JavaScript and per-field Mapping to populate a destination field containing the source worksheet name.
Step 1. Create a Mapping for when the source field doesn't exist, and the destination field is a calculated field.
Step 2. Click the Edit field value function (pen)
icon and enter the following line:
destination.getSourceToUse().getDataSet().getDataObjectToRead();
Comments
0 comments
Please sign in to leave a comment.