Smart Marker | Subtotal Question/Issue

Hi,


I am a Aspose.Words user (which I love) and I am now evaluating Cells. I am having an issue using the &=subtoal9:Table.Row1 Smart Marker. The syntax works when I use the inline version (&=[Table].Row3(subtotal9:Table.Row1)) but it does not work when I use the standalone version in the row below. I need the standalone version for I want to format the subtotals differently.

Also, once the grouping works, what is the best way to put a border around each grouping.

See the attached designer xls

Thanks for your help
Hi,

Well, I have tested your scenario and the smart markers works in stand alone version (in the format i.e.., &=subtoal9:Table.Row1) works fine too. Which version of the Aspose.Cells for .NET you are using? I am using the latest version v4.7.1.x, so please make sure that you are using the latest version. I have created an example using Northwind MS Access sample database for demonstration, the input and out files are attached. Check the second worksheet of the template file "nSmartMarkerDesigner.xls" and see the marker ("&=subtotal9:Order Details.OrderID") placed in C6 cell.

Sample code:

//Create a connection object, specify the provider info and set the data source.
OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=f:\\test\\Northwind.mdb");
//Open the connection object.
con.Open();
//Create a command object and specify the SQL query.
OleDbCommand cmd = new OleDbCommand("Select * from [Order Details]", con);
//Create a data adapter object.
OleDbDataAdapter da = new OleDbDataAdapter();
//Specify the command.
da.SelectCommand = cmd;
//Create a dataset object.
DataSet ds = new DataSet();
//Fill the dataset with the table records.
da.Fill(ds, "Order Details");
//Create a datatable with respect to dataset table.
DataTable dt = ds.Tables["Order Details"];
//Create WorkbookDesigner object.
WorkbookDesigner wd = new WorkbookDesigner();
//Open the template file (which contains smart markers).
wd.Open("f:\\test\\nSmartMarkerDesigner.xls");
//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.Save("f:\\test\\nSmartMarkerDesignerout.xls");

Also, once the grouping works, what is the best way to put a border around each grouping.

Well, you may try to set borders around your markers at design time, see the template file "nSmartMarkerDesigner.xls", the borders would be set automatically in the output file after the markers are processed.

For your reference, please check the document: http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/smart-markers.html

If you still find the issue, kindly create a console application, zip it and post it here to show the issue, we will check it soon.

Thank you.