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.
@billni,
Please add correct column to the table, otherwise we could not find how many rows should be inserted.
Please try the following codes with the attached file
DataTable t = new DataTable(“Customers”);
DataColumn dc1 = t.Columns.Add(“数量”);
//Set its data type.
dc1.DataType = System.Type.GetType(“System.Int32”);
//Add a new new record to it.
DataRow row = t.NewRow();
row[0] = 2;
t.Rows.Add(row);
//Add a new new record to it.
DataRow row1 = t.NewRow();
row1[0] = 3;
t.Rows.Add(row1);
//Create WorkbookDesigner object.
WorkbookDesigner designer = new WorkbookDesigner();
//Open the temple Excel file.
designer.Workbook = new Workbook(dir + "SmartMarkerDesigner.xls");
//Set the datasource.
designer.SetDataSource(t);
//Process the markers.
designer.Process();
//Save the Excel file.
designer.Workbook.Save(dir + "dest.xls");
I have checked your xls and code. In your xls file, you changed &=subtotal9:Customers.数量 into =SUM(D5:D5) Yes, it works. What when I use &=subtotal9:Customers.数量 why it still not work?
You get it right now. “&=subtotal9:Customers.数量” is a smart maker which should be used in coordination with some other smart marker field to get summary value (of that other field) with respect to field “数量” in Customers table.
@billni
1, If you want to get subototal formula, please simly set Cell “D6” as =SUBTOTAL(9,D5:D5)
2, If you want to make &=subtotal9:Customers.数量 work, table defination(in the Row 5)must contain “group” smart marker , such as &=&=Customers.序号(group:normal)
阿里旺旺图片20211122213350.jpg (7.9 KB)
I hope it place into the cell,conected to boundary, not on left boundary.
Just like the effect top, right, bottom is what I wanted.
We understand your requirements. We think you need to show borders of the cells while fitting images to the cells using Smart Markers. We have logged a separate ticket with an id “CELLSNET-49898” for your issue. We will look into it soon.
Once we have an update on it, we will let you know here.
This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.