Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Overview
When you are setting the properties of a file exporter, setting the Type property to Excel Spreadsheet (Multi Input) adds an extra field, Excel Template (Expr) to the property tab; see File Exporter.
Use this option to add an expression that resolves to the name of a template file, which must exist. PhixFlow uses a template file to guide which values from which input pipes are written to which cells or cell ranges in the template file.
The Excel Template (Expr) is re-evaluated inside the input multiplier loop. This means it is possible for successive evaluations of the expression to give different values. Each value represents the name of a template file, which must exist.
Each pass of the input multiplier loop generates a new output file.
Using an Excel Template
Specify an Excel Sheet
You can specify an Excel sheet name as a template instruction. PhixFlow reads an attribute from a pipe to construct the sheet name:
Code Block |
---|
{pipe_name:attribute} |
Where:
pipe-name
specifies the pipeattribute
specifies the attribute.
For example, to use a value from the stream attribute called code, which is pulled from the pipe called "in", specify:
Code Block |
---|
{in.Code} |
Use Cells as Template Instructions
Any cell in the template may be set to a template instruction.
A template instruction looks like this:
Code Block |
---|
{keyword: value, keyword: value, ...} |
Valid keywords are:
Keyword | Value | Meaning |
---|---|---|
source | pipe | The If there is a corresponding If there is a corresponding |
value | pipe.attribute | The value of this cell should be set to the value of the indicated pipe attribute. Specify
|
row | last | This is the last row of a region. Each |
column | last | This is the last column of a region. Each |
exclude | pipe.attribute | true | false | Use this keyword to delete a worksheet, using the exported data.
|
Tip |
---|
Where a cell is not formatted as text, prefix-quote the contents to store a text annotation. |
Definitions
Term | Definition |
---|---|
multi-row source | A pipe that will be used to return zero or more records. Any value reference to an attribute of a multi-row source returns
The current row is advanced once for each row in the multi-cell region from which it is referenced. |
single-row source | A pipe that will return zero or one records. Any value reference to an attribute of a single-row source returns
|
multi-row region | A rectangular group of cells whose contents will be overwritten by multiple records read from a pipe. A region can be
A row in the Excel spreadsheet can contain only one multi-cell region. A multi-row region cannot overlap any other multi-cell region. PhixFlow will report an error if either of these arrangements arise. The region is defined by:
The source keyword indicates the pipe
When PhixFlow writes data into Excel using the template:
|
single-cell region | A single-cell region is defined by a cell that is outside any multi-row region and contains a
|
Live Search | ||||||||
---|---|---|---|---|---|---|---|---|
|
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|