Data from several worksheets joining and copying to EasyInput data worksheet (EI_Data is the default name that can be changed while configuring the script)
Using EasyInput script configuration (EI_Config worksheet) setting ImportDataFromSeparateSheets, one can switch on the functionality allowing joining data, that is prepared on separate worksheets into one entity copied to the script data worksheet (usually EI_Data). This is especially useful, when inbound data is prepared on separate worksheets (e.g. header line and line items separately), and one needs to join the data in order to be able to use the data in EasyInput.
When this functionality is switched on (“X” value of EI_C_JOIN_DATA_SHEETS parameter), then additional ribbon menu button “Import data from separate sheets” appears on EasyInput ribbon menu when script data worksheet is active.
When this button is pressed additional popup window allowing customization of the data joining and import and processing the joining appears:
Before the import is executed for the first time, the configuration has to be made. This configuration is accessible after pressing the “Importing and joining data configuration” button. Then additional configuration window appears:
The table below describe the configuration elements:
Configuration element |
Description |
Structure – section responsible for defining hierarchy of configuration rows |
|
ID |
ID of the configuration row. In a correct configuration, the first row is always present. The other rows are optional. |
Used |
Checkbox activating the row. Inactive rows are not taken into account when processing. |
Where used |
* depicts any Script. If the configuration row should work only for a specified script, its script ID can be put here. |
Parent ID |
Depicts ID of the other row, to which the row is linked to. E.g. if in the first line the place where header data are stored is defined, then, the second row could define the line items and should have set 1 in the Parent ID. The Parent ID allows to build a hierarchy of elements that should be imported to the data worksheet. |
Data position – section defining from where data will be taken (source) and where on the data worksheet it will be placed (Destination column). |
|
Source worksheet |
Depicts MS Excel worksheet where the source data are placed. |
Source cell/ range |
Depicts the cell of the Source worksheet from which down and to the right the data to be imported is placed. Alternatively one can put here a start cell or a range e.g.: B1 or B1:D1000 |
Destination column |
Depicts the ID (in letters) of the column of the data worksheet (destination worksheet) to which (including and to the cells on the right side) the data will be copied. Note that, the start row for data/destination worksheet is set on the basis of the script configuration. |
Data link - On the basis of data from these fields, EasyInput can find the right data on the lower level for the data on the upper level (e.g. line items respective for the header line). In order to make this match EasyInput compares the values in the cells described by the specified columns. |
|
Source columns |
In this section one can put one, two or three IDs of the columns that will be used to link the data on a given level with the data on higher levels (Parent ID). In these fields one can put e.g. A, B, C, AA, AC, etc. |
Parent source columns |
In this section one can put one, two or three IDs of the columns of the source worksheet of the parent row. The number of columns defined here should be equal to the number of columns on Source columns area. |
Check columns – this optional section allows specifying columns in which during execution EasyInput will put: - On the source worksheet - the reference to the pace where data is copied on the data sheet will be placed - On the data worksheet - the reference to the source sheet and row from which the data was copied This can be useful e.g. to detect the line items for which no header exists. Such line items will not be used for copying and will not have the reference to the data sheet. |
|
Source |
Specifies column on the source sheet, where reference to the relevant row of EasyInput data sheet will be put |
Destination |
Specifies the column of the EasyInput data sheet where the reference to the data source should be put. |
Browse through the example files provided with the EasyInput solution to check this function usage.