How to Read percentage value with sign(%) from Excel file using ClosedXml

房东的猫 提交于 2019-12-25 16:48:39

问题


Input: Cell Value=6.25%;

var Value= ws1.Cell(rowNum, collNum).Value.ToString();

Output: 0.0625 Expected Output: 6.25%


回答1:


I find the solution by using .GetFormattedString() insted of .Value



来源:https://stackoverflow.com/questions/44159232/how-to-read-percentage-value-with-sign-from-excel-file-using-closedxml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!