WorkbookDesigner

WorkbookDesigner class

Encapsulates the object that represents a designer spreadsheet.

Constructors

NameDescription
WorkbookDesignerInitializes a new instance of the WorkbookDesigner class.
WorkbookDesignerInitializes a new instance of the WorkbookDesigner class.

Properties

NameTypeDescription
WorkbookWorkbookGets and sets the Workbook object.
RepeatFormulasWithSubtotalbooleanIndicates whether repeating formulas with subtotal row.
UpdateEmptyStringAsNullbooleanIf TRUE, Null will be inserted if the value is “”;
UpdateReferencebooleanIndicates if references in other worksheets will be updated.
CalculateFormulabooleanIndicates whether formulas should be calculated.
LineByLinebooleanIndicates whether processing the smart marker line by line. The default value is true. If False, the template file must
ContainsVariablesboolean
VariablesWorksheetNameString
SortDataSourceboolean

Methods

NameDescription
clearDataSourceClears all data sources.
setJsonDataSource
setDataSourceSets data binding to a variable.
process
getSmartMarkersReturns 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.

ParameterTypeDescription
workbookWorkbookThe 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)

ParameterTypeDescription
variable
data

setDataSource(variable, data)

Sets data binding to a variable.

ParameterTypeDescription
variableStringVariable name created using smart marker.
dataObjectSource 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.

ParameterTypeDescription
isPreservedbooleanTrue 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.

ParameterTypeDescription
sheetIndexintWorksheet index.
isPreservedbooleanTrue 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