HI
am using WorkbookDesigner to fill excel.Now i need to know how to format a cell in the template like Percentage,so that percentage sysmbol should come in the cell values Like 45%
Regards
Ajeesh
HI
am using WorkbookDesigner to fill excel.Now i need to know how to format a cell in the template like Percentage,so that percentage sysmbol should come in the cell values Like 45%
Regards
Ajeesh
Hi,
Hi
Here by am attaching my Template Excel file and the Result Excel file.In template excel file i have a field called EmpiD and i made it format as Percentage in manually,But its not comming in result.
DataTable dt = new DataTable();
DataRow dr;
dt.Columns.Add("EmpId");
dt.Columns.Add("EmpName");
dr = dt.NewRow();
dr["EmpId"]="1";
dr["EmpName"] = "Test1";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["EmpId"] = "2";
dr["EmpName"] = "Test2";
dt.Rows.Add(dr);
dt.TableName = "Test";
WorkbookDesigner wd = new WorkbookDesigner();wd.Workbook = new Workbook(@"C:\Documents and Settings\amj001\Desktop\Test.xlsx");
wd.SetDataSource(dt);
wd.Process(true);
wd.Workbook.Save(@"C:\Documents and Settings\amj001\Desktop\Result.xlsx"); this is my code can u check my template as well as code
Regards
Ajeesh
Hi,
DataTable dt = new DataTable();
DataRow dr;
dt.Columns.Add(“EmpId”, typeof(int));
dt.Columns.Add(“EmpName”);
dr = dt.NewRow();
dr[“EmpId”]=1;
dr[“EmpName”] = “Test1”;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[“EmpId”] = 2;
dr[“EmpName”] = “Test2”;
dt.Rows.Add(dr);
dt.TableName = “Test”;
WorkbookDesigner wd = new WorkbookDesigner();wd.Workbook = new Workbook(@“C:\Documents and Settings\amj001\Desktop\Test.xlsx”);
wd.SetDataSource(dt);
wd.Process(true);
wd.Workbook.Save(@“C:\Documents and Settings\amj001\Desktop\Result.xlsx”);
HI
Thanks for your replay.The above code is working too.Now the problem is instead of 1% its displaying 100%.How to over come this
Hi,