使用NPOI导入Excel 并将导入的Excel导出到另一个Excel 由于导入的公式为string类型
无法实现公式随着行号的变化而动态改变
导入:
if (row.GetCell(j) != null && row.GetCell(j).CellType == CellType.Numeric)
dataRow[j] = row.GetCell(j).NumericCellValue;
if (row.GetCell(j) != null && row.GetCell(j).CellType == CellType.Formula)
dataRow[j] = row.GetCell(j).CellFormula;
导出
cell.CellFormula = ExcelFormuladt.Rows[iRowIndex][iCellIndex].ToString();
求给出一种解决问题的思路