SpreadSheetBuilder¶
Definition¶
Extends¶
Extended By¶
None
Description¶
Builder for generating a Spreadsheet
Method Summary¶
Owner | Name | Return Type | Description |
---|---|---|---|
SpreadSheetBuilder | constructor() | SpreadSheetBuilder | Creates a builder for generating a Spreadsheet |
SpreadSheetBuilder | addFlexSheet(name) | Boolean | Creates a new empty flex sheet with the given name. Note that if used alongside the loadExisting functionality, this should be added after otherwise loading behavior is undefined |
SpreadSheetBuilder | addSheet(tablePanel, sheetName, onlySelectedRows, shouldFormat) | Boolean | Adds a sheet into the spreadsheet workbook. Returns true if operation is sucessful; false in any other case including passing null as parameter(s). |
SpreadSheetBuilder | addSheet(tab, onlySelectedRows, shouldFormat) | Boolean | Finds all the tables contained by the tab and builds sheets off of them. Returns true if operation is successful; false in any other case including passing null as parameter(s). |
SpreadSheetBuilder | build() | Binary | Builds and returns a binary containing the spreadsheet. The spreadsheet builder will be reset after this is called. |
Object | getClassName() | String | Returns the string name of this object's class type. |
SpreadSheetBuilder | getSheetNames() | Set | Returns a set containing the names of the sheets added by the builder. |
SpreadSheetBuilder | getSheetsCount() | Integer | Returns the number of sheets built by the builder. |
SpreadSheetBuilder | getWorksheet(worksheetName) | Object | Returns an existing worksheet with the input name. (Returned type is a base class of either AmiWebSpreadsheet or AmiWebFlexsheet |
SpreadSheetBuilder | loadExistingSheets(data) | Boolean | Loads an existing xlsx file into individual flex sheets |
Object | toJson() | String | Returns a json representation of this object. |
Method Definitions¶
constructor()¶
SpreadSheetBuilder spreadsheetbuilder = new SpreadSheetBuilder()
Description¶
Creates a builder for generating a Spreadsheet
addFlexSheet(name)¶
Boolean SpreadSheetBuilder::addFlexSheet(String name)
Description¶
Creates a new empty flex sheet with the given name. Note that if used alongside the loadExisting functionality, this should be added after otherwise loading behavior is undefined
Parameter Definition¶
Name | Type | Description |
---|---|---|
name | String |
addSheet(tablePanel,sheetName,onlySelectedRows,shouldFormat)¶
Boolean SpreadSheetBuilder::addSheet(TablePanel tablePanel, String sheetName, Boolean onlySelectedRows, Boolean shouldFormat)
Description¶
Adds a sheet into the spreadsheet workbook. Returns true if operation is sucessful; false in any other case including passing null as parameter(s).
Parameter Definition¶
Name | Type | Description |
---|---|---|
tablePanel | TablePanel | The table to build the spreadsheet off of |
sheetName | String | name of the sheet |
onlySelectedRows | Boolean | true to only include selectedRows, false to build the entire table |
shouldFormat | Boolean | true to include table format (bg color, greybar color etc.), false to use default formatting |
addSheet(tab,onlySelectedRows,shouldFormat)¶
Boolean SpreadSheetBuilder::addSheet(Tab tab, Boolean onlySelectedRows, Boolean shouldFormat)
Description¶
Finds all the tables contained by the tab and builds sheets off of them. Returns true if operation is successful; false in any other case including passing null as parameter(s).
Parameter Definition¶
Name | Type | Description |
---|---|---|
tab | Tab | tab containing tables |
onlySelectedRows | Boolean | true to only include selectedRows, false to build entire tables contained in the tab |
shouldFormat | Boolean | true to include table format (bg color, greybar color etc.), false to use default formatting |
build()¶
Binary SpreadSheetBuilder::build()
Description¶
Builds and returns a binary containing the spreadsheet. The spreadsheet builder will be reset after this is called.
getSheetNames()¶
Set SpreadSheetBuilder::getSheetNames()
Description¶
Returns a set containing the names of the sheets added by the builder.
getSheetsCount()¶
Integer SpreadSheetBuilder::getSheetsCount()
Description¶
Returns the number of sheets built by the builder.
getWorksheet(worksheetName)¶
Object SpreadSheetBuilder::getWorksheet(String worksheetName)
Description¶
Returns an existing worksheet with the input name. (Returned type is a base class of either AmiWebSpreadsheet or AmiWebFlexsheet
Parameter Definition¶
Name | Type | Description |
---|---|---|
worksheetName | String |
loadExistingSheets(data)¶
Boolean SpreadSheetBuilder::loadExistingSheets(Binary data)
Description¶
Loads an existing xlsx file into individual flex sheets
Parameter Definition¶
Name | Type | Description |
---|---|---|
data | Binary |