Free Support Forum -

Necessary to use WorkbookDesigner class when using Smart Markers


I wanted to know that is it necessary
to use WorkBookDesigner Class while using smartMarkers?
As it is mentioned in the code
under Using Anonymous Types or Custom Objects.
//Definition of Custom class.

public class MyProduct


private string m_Name;

public string Name


get { return m_Name; }

set { m_Name = value; }


private int m_Age;

public int Age


get { return m_Age; }

set { m_Age = value; }


internal MyProduct(string name, int age)


this.m_Name = name;

this.m_Age = age;



// ****** Program ******

//Instantiate the workbookdesigner object.

WorkbookDesigner report = new WorkbookDesigner();

//Get the first worksheet(default sheet) in the workbook.

Aspose.Cells.Worksheet w = report.Workbook.Worksheets[0];

//Input some markers to the cells.




//Instantiate the list collection based on the custom class.

IList<MyProduct> list = new List<MyProduct>();

//Provide values for the markers using the custom class object.

list.Add(new MyProduct(“Simon”, 30));

list.Add(new MyProduct(“Johnson”, 33));

//Set the data source.

report.SetDataSource(“MyProduct”, list);

//Process the markers.


//Save the excel file.


Can we also use Workbook class to process SmartMarker in excel sheet?


Yes, it is necessary to use WorkbookDesigner class. Actually WorkbookDesigner.Process method process all the smart markers inside the workbook.


Yes, to process Smart Markers you have to use WorkbookDesigner class/object.
If you need to process smart markers in a specific sheet, you may use the overloaded version i.e.
WorkbookDesigner.Process (int sheetIndex, bool isPreserved) --> give 0, 1.2 etc. for your specific sheet index for the parameter.

Thank you.

Thanks Amjad.

Thanks Faiz