Commit 811be206 by lcx

Excel公式取值修改

parent a0ddf1ad
...@@ -25,7 +25,8 @@ public static string GetCellStringValue(ICell cell) ...@@ -25,7 +25,8 @@ public static string GetCellStringValue(ICell cell)
case CellType.String: case CellType.String:
return cell.StringCellValue.ToString().Replace("0", ""); return cell.StringCellValue.ToString().Replace("0", "");
case CellType.Formula: case CellType.Formula:
return cell.NumericCellValue.ToString().Replace("0", ""); cell.SetCellType(CellType.String);
return cell.StringCellValue.ToString().Replace("0", "");
} }
} }
catch (Exception ex) catch (Exception ex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment