NPOI
NPOI copied to clipboard
以0开头的单元取到的值 丢失0
http://thyrsi.com/t6/390/1539872939x-1404781240.png private static object GetCellStrValue(ICell cell) { try { return cell.StringCellValue; } catch(Exception ex1) {
return cell.ToString();
}
}
cell.StringCellValue;会抛异常, cell.ToString()会丢失开头的0。 在excel里,右键设置单元格格式,会显示自定义格式 [img]http://thyrsi.com/t6/390/1539915808x-1404781126.png[/img]
Howdy!
Could you please rewrite your question in plain english? Maybe more people can help you that way.