Hi,
i have gone through the demo for Smart Workers, which is kinda straight forward.
Problem: A smart marker should be replaced by a value from a column based on a value from the same row in a diferent column.
Do we have a staright forward solution for this?
Cheers
Nikhil
Hi Nikhil,
Well, I think you may try to utilize dynamic formulas in Smart Markers for your need. I have created a sample test according to your scenario, please check the input file (attached) first. I have used Northwind.mdb MS Access sample database in the example. Following is my sample code, please find attached the output file too.
Sample code:
OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=f:\\test\\Northwind.mdb");
con.Open();
OleDbCommand cmd = new OleDbCommand("Select * from [Order Details]", con);
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds, "Order Details");
DataTable dt = ds.Tables["Order Details"];
WorkbookDesigner wd = new WorkbookDesigner();
wd.Open("f:\\test\\tempsmarkers.xls");
wd.SetDataSource(dt);
wd.Process(false);
wd.Save("f:\\test\\outtempsmarkers.xls");
For your further reference about smart markers, please check the doc topic:
http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/smart-markers.html
Thank you.
Hi Amjad,
Thanx for the help.
I have a another scenario where in the data from one culumn should be loaded based on value from another column. The columns here are the DataTable columns.
Cheers,
Nikhil
Hi Nikhil,
I think you can put markers based on those datatable columns in the sheet and place your dynamic formulas accordingly.
Thank you.