subtotal9 is not working when use smart maker.
In excel template I Fill
Cell A1: Quantity
Cell A2: &=Customers.Quantity
Cell A3: &=subtotal9:Customers.Quantity
The code:
string MyDir = Application.StartupPath ;
//Get the image data.
byte[] imageData = File.ReadAllBytes(Application.StartupPath + “/1.jpeg”);
//Create a datatable.
DataTable t = new DataTable(“Customers”);
DataColumn dc1 = t.Columns.Add(“Quantity”);
//Set its data type.
dc1.DataType = System.Type.GetType(“System.Int32”);
//Add a new new record to it.
DataRow row = t.NewRow();
row[0] = imageData;
row[1] = 2;
t.Rows.Add(row);
//Add a new new record to it.
DataRow row1 = t.NewRow();
row1[0] = imageData;
row1[1] = 3;
t.Rows.Add(row1);
//Create WorkbookDesigner object.
WorkbookDesigner designer = new WorkbookDesigner();
//Open the temple Excel file.
designer.Workbook=new Workbook (MyDir + "/SmartMarkerDesigner.xls");
//Set the datasource.
designer.SetDataSource(t);
//Process the markers.
designer.Process();
//Save the Excel file.
designer.Workbook.Save(MyDir + "/SmartMarker.xls");
The cell: &=subtotal9:Customers.Quantity still is &=subtotal9:Customers.Quantity not working.
I also change &=subtotal9:Customers.Quantity into: =SUM(A2:A2) It also not working.