SpreadSheetFlexsheet¶
Definition¶
Extends¶
Extended By¶
None
Description¶
Builder for generating a Spreadsheet Worksheet
Method Summary¶
| Owner | Name | Return Type | Description |
|---|---|---|---|
| SpreadSheetFlexsheet | constructor() | SpreadSheetFlexsheet | Creates an empty Flexsheet |
| SpreadSheetFlexsheet | clearCell(dimension) | Boolean | Clears the specified range of cells (removes style and value) |
| SpreadSheetFlexsheet | clearCellNamedRange(namedRange) | Boolean | Clears the specified named range of cells |
| Object | getClassName() | String | Returns the string name of this object's class type. |
| SpreadSheetFlexsheet | getFormula(dimension) | String | Gets the current formula for a specified cell, returns null if it does not exist |
| SpreadSheetFlexsheet | getMergedCells() | List | Returns a list of strings representing the Excel dimensions of all merged cells in the format [top left cell (inclusive)]:[bottom right cell (inclusive)] |
| SpreadSheetFlexsheet | getRawValue(dimension) | Object | Gets the raw value of a single cell. Note that this is the underlying excel value not what excel might compute |
| SpreadSheetFlexsheet | getRawValueNamedRange(namedRange) | Object | Gets the value of a specified named range |
| SpreadSheetFlexsheet | getRawValues(dimension, hasHeader, classes) | Table | Returns the raw value of the specified range of cells as a table |
| SpreadSheetFlexsheet | getRawValuesNamedRange(namedRange, hasHeader, classes) | Table | Returns the raw value of the the specified named range as a table |
| SpreadSheetFlexsheet | getStyle(dimension) | Integer | Gets the style id for a specified range cell, returns null if it does not exist |
| SpreadSheetFlexsheet | getTitle() | String | Gets the name of the underlying sheet |
| SpreadSheetFlexsheet | getValue(dimension) | Object | Gets the value of a single cell. Note that this is the underlying excel value not what excel might compute |
| SpreadSheetFlexsheet | getValueNamedRange(namedRange) | Object | Gets the value of a specified named range |
| SpreadSheetFlexsheet | getValues(dimension, hasHeader, classes) | Table | Returns the specified range of cells as a table |
| SpreadSheetFlexsheet | getValuesNamedRange(namedRange, hasHeader, classes) | Table | Returns the specified named range as a table |
| SpreadSheetFlexsheet | mergeCells(startDimension, endDimension) | Boolean | Merges a contiguous group of cells together; the value/formula of the group will be that of the top left cell |
| SpreadSheetFlexsheet | setColumnWidth(colName, colWidth) | Boolean | Sets a column to the specified width |
| SpreadSheetFlexsheet | setFormula(dimensions, id) | Boolean | Sets the cell formula for the specified range of cells. Note that formulas do not affect the cell's value |
| SpreadSheetFlexsheet | setImage(dimension, imageBytes) | Boolean | Sets a cell to the specified image |
| SpreadSheetFlexsheet | setRowHeight(rowNumber, rowHeight) | Boolean | Sets a row to the specified height |
| SpreadSheetFlexsheet | setStyle(dimensions, id) | Boolean | Sets the style id for the specified range of cells |
| SpreadSheetFlexsheet | setTitle(title) | String | Sets the name of the underlying sheet |
| SpreadSheetFlexsheet | setValue(dimensions, value) | Boolean | Sets the value for the specified range of cells |
| SpreadSheetFlexsheet | setValue(dimension, value, useHeader) | Boolean | Sets the value for the specified range of cells using a table. Expects the top left position of the table as the input dimension |
| SpreadSheetFlexsheet | setValueNamedRange(namedRange, value) | Boolean | Sets the value for the specified named range of cells |
| Object | toJson() | String | Returns a string of a json representation of this object. |
| SpreadSheetFlexsheet | unmergeCells(dimension) | Boolean | Separates a contiguous group of merged cells into individual cells; they retain their values/formulas before merging |
Method Definitions¶
constructor()¶
SpreadSheetFlexsheet spreadsheetflexsheet = new SpreadSheetFlexsheet()
Description¶
Creates an empty Flexsheet
clearCell(dimension)¶
Boolean SpreadSheetFlexsheet::clearCell(String dimension)
Description¶
Clears the specified range of cells (removes style and value)
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimension | String | Excel dimensions to be cleared (e.g. A2, or A2:C4) |
clearCellNamedRange(namedRange)¶
Boolean SpreadSheetFlexsheet::clearCellNamedRange(String namedRange)
Description¶
Clears the specified named range of cells
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| namedRange | String | Excel named range to be cleared |
getClassName()¶
Description¶
Returns the string name of this object's class type.
getFormula(dimension)¶
String SpreadSheetFlexsheet::getFormula(String dimension)
Description¶
Gets the current formula for a specified cell, returns null if it does not exist
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimension | String | Single excel dimension to be used (e.g. A2) |
getMergedCells()¶
List SpreadSheetFlexsheet::getMergedCells()
Description¶
Returns a list of strings representing the Excel dimensions of all merged cells in the format [top left cell (inclusive)]:[bottom right cell (inclusive)]
getRawValue(dimension)¶
Object SpreadSheetFlexsheet::getRawValue(String dimension)
Description¶
Gets the raw value of a single cell. Note that this is the underlying excel value not what excel might compute
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimension | String | Excel dimensions to be used (e.g. A2, or A2:C4 for a range) |
getRawValueNamedRange(namedRange)¶
Object SpreadSheetFlexsheet::getRawValueNamedRange(String namedRange)
Description¶
Gets the value of a specified named range
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| namedRange | String | Named excel dimensions to be used |
getRawValues(dimension,hasHeader,classes)¶
Table SpreadSheetFlexsheet::getRawValues(String dimension, Boolean hasHeader, List classes)
Description¶
Returns the raw value of the specified range of cells as a table
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimension | String | Excel dimensions to be retrieved (e.g. A2:C4). Only works for ranges |
| hasHeader | Boolean | Does the range include a table header |
| classes | List | List of expected column class types, use null to skip, speeds up parsing by removing type deduction (Supported: "String","Boolean","Integer","Long","Float","Double") |
getRawValuesNamedRange(namedRange,hasHeader,classes)¶
Table SpreadSheetFlexsheet::getRawValuesNamedRange(String namedRange, Boolean hasHeader, List classes)
Description¶
Returns the raw value of the the specified named range as a table
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| namedRange | String | Named excel range to be retrieved |
| hasHeader | Boolean | Does the range include a table header |
| classes | List | List of expected column class types, use null to skip, speeds up parsing by removing type deduction (Supported: "String","Boolean","Integer","Long","Float","Double") |
getStyle(dimension)¶
Integer SpreadSheetFlexsheet::getStyle(String dimension)
Description¶
Gets the style id for a specified range cell, returns null if it does not exist
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimension | String | Single excel dimension to be used (e.g. A2) |
getTitle()¶
String SpreadSheetFlexsheet::getTitle()
Description¶
Gets the name of the underlying sheet
getValue(dimension)¶
Object SpreadSheetFlexsheet::getValue(String dimension)
Description¶
Gets the value of a single cell. Note that this is the underlying excel value not what excel might compute
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimension | String | Excel dimensions to be used (e.g. A2, or A2:C4 for a range) |
getValueNamedRange(namedRange)¶
Object SpreadSheetFlexsheet::getValueNamedRange(String namedRange)
Description¶
Gets the value of a specified named range
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| namedRange | String | Named excel dimensions to be used |
getValues(dimension,hasHeader,classes)¶
Table SpreadSheetFlexsheet::getValues(String dimension, Boolean hasHeader, List classes)
Description¶
Returns the specified range of cells as a table
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimension | String | Excel dimensions to be retrieved (e.g. A2:C4). Only works for ranges |
| hasHeader | Boolean | Does the range include a table header |
| classes | List | List of expected column class types, use null to skip, speeds up parsing by removing type deduction (Supported: "String","Boolean","Integer","Long","Float","Double") |
getValuesNamedRange(namedRange,hasHeader,classes)¶
Table SpreadSheetFlexsheet::getValuesNamedRange(String namedRange, Boolean hasHeader, List classes)
Description¶
Returns the specified named range as a table
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| namedRange | String | Named excel range to be retrieved |
| hasHeader | Boolean | Does the range include a table header |
| classes | List | List of expected column class types, use null to skip, speeds up parsing by removing type deduction (Supported: "String","Boolean","Integer","Long","Float","Double") |
mergeCells(startDimension,endDimension)¶
Boolean SpreadSheetFlexsheet::mergeCells(String startDimension, String endDimension)
Description¶
Merges a contiguous group of cells together; the value/formula of the group will be that of the top left cell
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| startDimension | String | Excel dimension of the top left cell (inclusive) |
| endDimension | String | Excel dimension of the bottom right cell (inclusive) |
setColumnWidth(colName,colWidth)¶
Boolean SpreadSheetFlexsheet::setColumnWidth(String colName, Number colWidth)
Description¶
Sets a column to the specified width
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| colName | String | Excel column name to be affected (e.g. A, AB) |
| colWidth | Number | Column width to use |
setFormula(dimensions,id)¶
Boolean SpreadSheetFlexsheet::setFormula(String dimensions, String id)
Description¶
Sets the cell formula for the specified range of cells. Note that formulas do not affect the cell's value
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimensions | String | Excel dimensions to be applied (e.g. A2, or A2:C4 for a range) |
| id | String | Formula to be used |
setImage(dimension,imageBytes)¶
Boolean SpreadSheetFlexsheet::setImage(String dimension, Binary imageBytes)
Description¶
Sets a cell to the specified image
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimension | String | Excel dimension to be used (e.g. A2, B3:C4) |
| imageBytes | Binary | Image bytes |
setRowHeight(rowNumber,rowHeight)¶
Boolean SpreadSheetFlexsheet::setRowHeight(Integer rowNumber, Number rowHeight)
Description¶
Sets a row to the specified height
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| rowNumber | Integer | Excel row to be affected (e.g. 2, 14) |
| rowHeight | Number | Row height to use |
setStyle(dimensions,id)¶
Boolean SpreadSheetFlexsheet::setStyle(String dimensions, Integer id)
Description¶
Sets the style id for the specified range of cells
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimensions | String | Excel dimensions to be applied (e.g. A2, or A2:C4 for a range) |
| id | Integer | Style id to be set (use getStyle to retrieve an existing id) |
setTitle(title)¶
String SpreadSheetFlexsheet::setTitle(String title)
Description¶
Sets the name of the underlying sheet
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| title | String | Title to be set for the sheet |
setValue(dimensions,value)¶
Boolean SpreadSheetFlexsheet::setValue(String dimensions, Object value)
Description¶
Sets the value for the specified range of cells
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimensions | String | Excel dimensions to be applied (e.g. A2, or A2:C4 for a range) |
| value | Object | Value to be set |
setValue(dimension,value,useHeader)¶
Boolean SpreadSheetFlexsheet::setValue(String dimension, Table value, Boolean useHeader)
Description¶
Sets the value for the specified range of cells using a table. Expects the top left position of the table as the input dimension
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimension | String | Upper left excel dimension to be used (e.g. A2) |
| value | Table | Table to be set |
| useHeader | Boolean | Should the table's header be applied |
setValueNamedRange(namedRange,value)¶
Boolean SpreadSheetFlexsheet::setValueNamedRange(String namedRange, Object value)
Description¶
Sets the value for the specified named range of cells
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| namedRange | String | Named excel dimensions to be used |
| value | Object | Value to be set |
toJson()¶
Description¶
Returns a string of a json representation of this object.
unmergeCells(dimension)¶
Boolean SpreadSheetFlexsheet::unmergeCells(String dimension)
Description¶
Separates a contiguous group of merged cells into individual cells; they retain their values/formulas before merging
Parameter Definition¶
| Name | Type | Description |
|---|---|---|
| dimension | String | Excel dimension of top left cell of the group to separate |