Class WorkbookDesigner

WorkbookDesigner class

Encapsulates the object that represents a designer spreadsheet.

public class WorkbookDesigner

Constructors

NameDescription
WorkbookDesigner()Initializes a new instance of the WorkbookDesigner class.
WorkbookDesigner(Workbook)Initializes a new instance of the WorkbookDesigner class.

Properties

NameDescription
CalculateFormula { get; set; }Indicates whether formulas should be calculated.
CallBack { get; set; }Gets and sets callback interface of processing smartmarker.
LineByLine { get; set; }Indicates whether processing the smart marker line by line.
RepeatFormulasWithSubtotal { get; set; }Indicates whether repeating formulas with subtotal row.
UpdateEmptyStringAsNull { get; set; }If TRUE, Null will be inserted if the value is “”;
UpdateReference { get; set; }Indicates if references in other worksheets will be updated.
Workbook { get; set; }Gets and sets the Workbook object.

Methods

NameDescription
ClearDataSource()Clears all data sources.
GetSmartMarkers()Returns a collection of smart markers in a spreadsheet.
Process()Processes the smart markers and populates the data source values.
Process(bool)Processes the smart markers and populates the data source values.
Process(int, bool)Processes the smart markers and populates the data source values.
SetDataSource(DataSet)Sets data source of a DataSet object.
SetDataSource(DataTable)Sets data source of a DataTable object.
SetDataSource(DataView)Sets data source of a DataView object.
SetDataSource(OleDbConnection)Sets data source of a OleDbConnection object.
SetDataSource(SqlConnection)Sets data source of a SqlConnection object.
SetDataSource(string, DataView)Sets data source of a DataView object and binds it to a data source name.
SetDataSource(string, ICellsDataTable)Sets data source of a ICellsDataTable object.
SetDataSource(string, object)Sets data binding to a variable.
SetDataSource(string, IDataReader, int)Sets data source of a IDataReader object.
SetJsonDataSource(string, string)

Examples


[C#]

//Create WorkbookDesigner object.
WorkbookDesigner wd = new WorkbookDesigner();
//Open the template file (which contains smart markers).
wd.Workbook = new 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