You can programmatically access the actual name of the source Excel worksheet and use it as a field value in the destination.
For 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.
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.