Range ViewHelper <c:cell.range>
ViewHelper that returns a range of cells.
Go to the source code of this ViewHelper: RangeViewHelper.php (GitHub).
Arguments
The following arguments are available for the range ViewHelper:
-
- Type
- string
Range of cells. If empty, all the cells are returned.
-
- Default
- null
- Type
- mixed
Value returned in the array entry if a cell doesn't exist
-
- Default
- true
- Type
- boolean
If true, formulas are calculated
-
- Default
- false
- Type
- boolean
If true, formatting is applied to the cell values
-
- Default
- false
- Type
- boolean
If false, it returns a simple array of rows and columns indexed by number counting from zero. If true, row and column IDs are kept
-
- Default
- null
- Type
- mixed
If formatData is true, it provides search string or array
-
- Default
- null
- Type
- mixed
If formatData is true, it provides replacement string or array
Examples
Inline
<c:spreadsheet fileName="EXT:sav_charts/Resources/Private/Templates/ChartsExamples/Spreadsheet.xlsx">
<c:worksheet name="Example2">
<c:data id="labels" values="{c:cell.range(range:'B2:B5')}" />
<c:data id="data" values="{c:cell.range(range:'D2:D5', formatData:true, search:{0:'%',1:','}, replace:{0:'',1:'.'})->c:transpose()}" />
</c:worksheet>
</c:spreadsheet>
Copied!
<c:spreadsheet fileName="EXT:sav_charts/Resources/Private/Templates/PlotlyChartsExamples/Surface3D.csv">
<c:worksheet>
<c:data id="csv" values="{c:cell.range()->c:transpose()}" />
</c:worksheet>
</c:spreadsheet>
Copied!