NPOI icon indicating copy to clipboard operation
NPOI copied to clipboard

以0开头的单元取到的值 丢失0

Open male110 opened this issue 6 years ago • 1 comments

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]

male110 avatar Oct 19 '18 02:10 male110

Howdy!

Could you please rewrite your question in plain english? Maybe more people can help you that way.

Malavos avatar Dec 11 '18 16:12 Malavos