WorkbookDesigner class

WorkbookDesigner class

Encapsulates the object that represents a designer spreadsheet.

The WorkbookDesigner type exposes the following members:

Constructors

ConstructorDescription
__init__(self)Initializes a new instance of the WorkbookDesigner class.
__init__(self, workbook)Initializes a new instance of the WorkbookDesigner class.

Properties

PropertyDescription
workbookGets and sets the WorkbookDesigner.workbook object.
repeat_formulas_with_subtotalIndicates whether repeating formulas with subtotal row.
update_empty_string_as_nullIf TRUE, Null will be inserted if the value is “”;
update_referenceIndicates if references in other worksheets will be updated.
calculate_formulaIndicates whether formulas should be calculated.
call_backGets and sets callback interface of processing smartmarker.
line_by_lineIndicates whether processing the smart marker line by line.

Methods

MethodDescription
set_data_source(self, data_source, cells_data_table)Sets data source of a ICellsDataTable object.
set_data_source(self, variable, data)Sets data binding to a variable.
process(self, range, is_preserved)Processes the smart markers and populates the data source values.
process(self)Processes the smart markers and populates the data source values.
process(self, is_preserved)Processes the smart markers and populates the data source values.
process(self, sheet_index, is_preserved)Processes the smart markers and populates the data source values.
clear_data_source(self)Clears all data sources.
set_json_data_source(self, variable, data)
get_smart_markers(self)Returns a collection of smart markers in a spreadsheet.

Example

from aspose.cells import Workbook, WorkbookDesigner

# Create WorkbookDesigner object.
wd = WorkbookDesigner()
# Open the template file (which contains smart markers).
wd.workbook = Workbook("SmartMarker_Designer.xls")
# Initialize your data from data source
# DataSet ds = new DataSet();
# ...
# Set the datatable as the data source.
# wd.SetDataSource(dt);
# Process the smart markers to fill the data into the worksheets.
wd.process(True)
# Save the excel file.
wd.workbook.save("outSmartMarker_Designer.xls")

See Also