hi can you tell how to format excel directly using smart markers, that is i have template and in that template i have made format to each cell,according to that format my data should display like percentage,numeric and i don’t want to do any coding.Everything i need to do in template thats is all formatting in exce should reflect in output
Hi,
Hi,
Thanks for your posting.
Please download and use the latest version:
Aspose.Cells
for .NET v7.1.2.4
We have recently added copystyle smartmarker property in our newer versions. This property enables you to copy base cell’s style to each cell. Please see if it fits your needs.
Please see the following demo how to make use of this property.
Please see the source xlsx file used in this code and the output xlsx file generated by it. I have also attached the screenshot for your reference.
C#
string filePath = @“D:\source.xlsx”;
Workbook wb = new Workbook(filePath);
WorkbookDesigner d = new WorkbookDesigner();
d.Workbook = wb;
DataTable dt = new DataTable(“MyDataSource”);
dt.Columns.Add(“ProjectID”);
dt.Columns.Add(“ProjectName”);
dt.Columns.Add(“ProjectStatus”);
dt.Rows.Add(new object[] { “1”, “2”, “3” });
dt.Rows.Add(new object[] { “1”, “2”, “3” });
dt.Rows.Add(new object[] { “1”, “2”, “3” });
d.SetDataSource(dt);
d.Process();
wb.Save(filePath + “.out.xlsx”);
Screenshot
hi can we use &=DataSource.FieldName like &=DataSource.FieldName * 100 or &=DataSource.FieldName / 100
Hi,