ExcelAppenderUnit
Group |
|
Class Name |
com.ebd.hub.datawizard.iu.ExcelAppenderUnit |
Function |
This Integration Unit fills an existing Excel file with values of the destination tree. |
Description
Introduction: Integration Units. Set the Content in the Content settings of a Response Route in phase 6 to Output of IU.
Important note: Please use encoding 8859_1 in Response Routes that use the output of this Integration Unit.
The ExcelAppenderUnit uses an existing Excel file as a template and fills it with values of the destination tree. Important note: The Integration Unit supports only .xlt, .xls or .xlsx template files. Other Excel file formats are not supported. The output files are in the same format and the template file itself is not modified. To create the output Excel file, use a Response Route of type File and set the Content to Output of IU. And then simply use file name table.xls, for example.
If a String or a Blob value in the destination tree starts with Formula:, for example Formula:=SUM(A1,A3), the formula will be inserted into the Excel cell. A list of supported Excel functions can be found here.
The Integration Unit expects the filename and path of an Excel template file, the line, after which the data should be inserted, and the start column.
If the optional parameter Use multiple sheets is configured with value true, multiple spreadsheets can be generated. For that purpose, a destination node can be associated with a spreadsheet by setting the node attribute Optional Settings to the number of the corresponding spreadsheet. Only integer values, starting with 1, are allowed.
Parameter Description
Parameter Name |
Allowed Values |
Default Value |
Description |
Append data after row |
|
1 |
Row number, after which the data is to be inserted. |
Excel password for protection |
|
|
Password for the Excel file. Which Excel attributes are set is described in section Excel Password Protection Attributes. |
Excel template file |
|
|
File name and path of the Excel template file. |
Export as XML |
true, false |
false |
Creates the Excel file in the Microsoft XML format SpreadsheetML . Note: Set the content to Output of IU and the encoding to 8859_1 in the Response Route. |
Force style |
true, false |
false |
See parameter Use style of row. |
Ignore new line in cell data |
true, false |
false |
If true, linebreaks (NL) in cells are ignored. |
One sheet for each record |
true, false |
false |
Creates one sheet for each record. |
Remove all empty rows at end of each worksheet |
true, false |
false |
Removes all empty rows at the end of each worksheet. |
Remove all formulas |
true, false |
false |
Removes all formulas after calculations have been done (e.g. because a partner should not see them). |
Replace variable filler |
true, false |
false |
Replaces variable fillers {var_myVariable} in the template file. |
Sheet names (use semicolon to delimit names) |
|
1 |
Name of spreadsheets if the option Use multiple sheets is used. |
Skip empty fields |
true, false |
false |
Cells in Excel are not 'touched' if the destination structure field's Empty Flag is set. That is, for example, no empty string is written (necessary if a cell has a formula that should not be overwritten). |
Start at column |
|
1 |
Column number, after which the data is to be inserted. |
Use multiple sheets |
true, false |
false |
To use multiple spreadsheets in Excel. |
Use style of row |
|
0 |
The format of the specified row of the template file is used as format for the newly created rows. If the format is to be adopted in general (not only for new lines), you can use parameter Force style. 0 = no template. |
Example
Assumption: The template file (.xlsx) has four sheets for the four quarters with names: QI,QII,QIII,QIV.
If you want to write into the third sheet (QIII), the following parameters and values have to be set:
Use multiple sheets = trueSheet names (use semicolon to delim names) = QI;QII;QIII;QIV
The node that is supposed to write into sheet QIII needs to have value 3 in node attribute Optional Settings.