Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Example
Template
This template assumes that the file exporter has 2 input pipes:
- pipe p2, with attributes abc and def
- pipe p3, with attributes a4, a5 and a6.
In the following diagrams, cells are coloured green for single-cell regions and pink for multi-row regions to show how the template is organised.
A | B | C | D | E | F | G | |
---|---|---|---|---|---|---|---|
1 | {exclude:false} | ||||||
2 | {value:p3.a4} | ||||||
3 | {value:p3.a5} | ||||||
4 | {source:p2, value:p2.abc} | {value:p2.def} | text, number or expression |
| |||
5 | |||||||
6 | something | {row:last} | |||||
7 |
Notes
Multi-row regions can contain references to other pipes than the source for the region. References to:
Cell | Description |
---|---|
B1 | This is an exclude tab, with value of false. This tab will NOT be deleted from the output file. |
B2 | This is a single-cell region, and will be overwritten with:
|
D3 | This is a single-cell region, and will be overwritten with
|
C4 | This is the top left cell of a multi-cell region, and will be overwritten by multiple rows read from pipe p2. This cell should be set to the value of attribute abc from p2. All cells in following rows down to the row tagged as ' |
F4 | This is the top right cell of the region starting at C4. The This cell, and the cells below (one for each row read from p2) should be set to the value of attribute a6 from the first record read from p3. |
C6 | This is the bottom left cell of the region starting at C4. This cell should be set to attribute |
D4 | This cell should be set to the value of attribute def from p2. All cells in following rows down to the row tagged as '{row: last} will be overwritten by successive rows read from p2. |
E4 | This cell has no instruction, so whatever is in this cell (blank, text, number, expression), will be copied down into newly inserted rows. |
Result
This Excel spreadsheet that PhixFlow creates using the spreadsheet assumes that 5 records have been read from the pipe p2.
Annotations in the form p2(row3).def mean:
- data read from pipe p2
- includes the value of the attribute def
- on the 3rd row - (row3).
A | B | C | D | E | F | G | |
---|---|---|---|---|---|---|---|
1 | {exclude:false} | ||||||
2 | p3(row1).a4 | ||||||
3 | p3(row1).a4 | ||||||
4 | p2(row1).abc | p2(row1).def | text, number or expression | p3(row1).a6 | |||
5 | p2(row2).abc | p2(row2).def | text, number or expression | p3(row1).a6 | |||
6 | something | p2(row3).abc | p2(row3).def | text, number or expression | p3(row1).a6 | ||
7 | blank | blank | p2(row4).abc | p2(row4).def | text, number or expression | p3(row1).a6 | blank |
blank | blank | p2(row5).abc | p2(row5).def | text, number or expression | p3(row1).a6 | blank | |
(was A7) | (was B7) | (was C7) | (was D7) | (was E7) | (was F7) | (was G7) |
Notes
Evaluated Cell | Meaning |
---|---|
B2 | A non-executed exclude tab remains. You could set this cell (either it's row or column) as hidden if you don't wish to see/print it. |
E4:E8 | These cells are copied down from E4 because there was no value instruction in the template in E4. |
Rows 7:8 | Because there were 2 more rows in p2 than in the multi-cell region starting at C4, 2 rows were inserted below row 6, each populated by copying row 6 then overwriting the new cells with values from the multi-row source. Each inserted row copies the format of the row above. |
A7:B8 G7:G8 | These cells have been inserted, and have no counterpart in the template, so are set to blank. |
A9 | Cells are marked to show their original positions and contents, so A9 contains the value from A7 in the template. |