WorkbookDesigner
WorkbookDesigner class
Encapsulates the object that represents a designer spreadsheet.
Constructors
| Name | Description |
|---|---|
| WorkbookDesigner | Initializes a new instance of the WorkbookDesigner class. |
| WorkbookDesigner | Initializes a new instance of the WorkbookDesigner class. |
Properties
| Name | Type | Description |
|---|---|---|
| Workbook | Workbook | Gets and sets the Workbook object. |
| RepeatFormulasWithSubtotal | boolean | Indicates whether repeating formulas with subtotal row. |
| UpdateEmptyStringAsNull | boolean | If TRUE, Null will be inserted if the value is “”; |
| UpdateReference | boolean | Indicates if references in other worksheets will be updated. |
| CalculateFormula | boolean | Indicates whether formulas should be calculated. |
| LineByLine | boolean | Indicates whether processing the smart marker line by line. The default value is true. If False, the template file must |
| ContainsVariables | boolean | |
| VariablesWorksheetName | String | |
| SortDataSource | boolean |
Methods
| Name | Description |
|---|---|
| clearDataSource | Clears all data sources. |
| setJsonDataSource | |
| setDataSource | Sets data binding to a variable. |
| process | |
| getSmartMarkers | Returns a collection of smart markers in a spreadsheet. |
A string array is created on every call. The array is sorted an |
WorkbookDesigner() (1 of 2)
Initializes a new instance of the WorkbookDesigner class.
WorkbookDesigner(workbook) (2 of 2)
Initializes a new instance of the WorkbookDesigner class.
| Parameter | Type | Description |
|---|---|---|
| workbook | Workbook | The template workbook file. |
WorkbookDesigner.Workbook property
Gets and sets the Workbook object.
Type: Workbook
WorkbookDesigner.RepeatFormulasWithSubtotal property
Indicates whether repeating formulas with subtotal row.
Type: boolean
WorkbookDesigner.UpdateEmptyStringAsNull property
If TRUE, Null will be inserted if the value is “”;
Type: boolean
WorkbookDesigner.UpdateReference property
Indicates if references in other worksheets will be updated.
Type: boolean
WorkbookDesigner.CalculateFormula property
Indicates whether formulas should be calculated.
Type: boolean
WorkbookDesigner.LineByLine property
Indicates whether processing the smart marker line by line. The default value is true. If False, the template file must contain a range which is named as “_CellsSmartMarkers”.
Type: boolean
WorkbookDesigner.ContainsVariables property
Type: boolean
WorkbookDesigner.VariablesWorksheetName property
Type: String
WorkbookDesigner.SortDataSource property
Type: boolean
clearDataSource()
Clears all data sources.
setJsonDataSource(name, json)
| Parameter | Type | Description |
|---|---|---|
| variable | ||
| data |
setDataSource(variable, data)
Sets data binding to a variable.
| Parameter | Type | Description |
|---|---|---|
| variable | String | Variable name created using smart marker. |
| data | Object | Source data. |
process(range, isPreserved) (1 of 4)
process() (2 of 4)
Processes the smart markers and populates the data source values.
process(isPreserved) (3 of 4)
Processes the smart markers and populates the data source values.
| Parameter | Type | Description |
|---|---|---|
| isPreserved | boolean | True if the unrecognized smart marker is preserved. |
process(sheetIndex, isPreserved) (4 of 4)
Processes the smart markers and populates the data source values.
This method works on worksheet level.
| Parameter | Type | Description |
|---|---|---|
| sheetIndex | int | Worksheet index. |
| isPreserved | boolean | True if the unrecognized smart marker is preserved. |
getSmartMarkers()
Returns a collection of smart markers in a spreadsheet.
A string array is created on every call. The array is sorted and duplicated values are removed.
Returns: A collection of smart markers