BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Query |
Answer | |
Formula calculation issue |
We are able to reproduce the scenario from the below cases.
Code snippet:
| |
Average calculation for several columns |
You can loop through the columns and set the average for all the columns using IWorksheet.Range[int firstRow,int firstCol,int lastRow,int lastColumn] property instead of using the name of the cell every time.
Please refer the code snippet below.
Code snippet:
|
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet worksheet = workbook.Worksheets[0];
DataTable reports = new DataTable();
reports.Columns.Add("SalesPerson");
reports.Columns.Add("SaleJanJune");
reports.Columns.Add("SaleJulyDec");
reports.Rows.Add("Andy Bernard", "12400","25500");
reports.Rows.Add("Jim Halpert", "45000", "35000");
reports.Rows.Add("Karen Fillippelli", "34000", "98000");
reports.Rows.Add("Phyllis Lapin", "70000", "90000");
reports.Rows.Add("Stanley Hudson", "80000", "90000");
worksheet.ImportDataTable(reports, true, 1, 1, false); |