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:
range
-
- Required
true
- Type
- string
Range of cells
nullValue
-
- Default
- null
- Type
- mixed
Value returned in the array entry if a cell doesn't exist
calculateFormulas
-
- Default
- true
- Type
- boolean
If true, formulas are calculated
formatData
-
- Default
- false
- Type
- boolean
If true, formatting is applied to the cell values
returnCellRef
-
- 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
search
-
- Default
- null
- Type
- mixed
If formatData is true, it provides search string or array
replace
-
- 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!