如何用逗号读取浮点值123,45
?
我必须阅读格式类似的第三方 excel 文件,123,45
我不能/不允许将它们重新格式化为123.45
.
我现在正在使用这种方法:
string GetCell(int row, int col)
{
if (Sheet != null)
{
try
{
string cellContent = Sheet[row][col].ToString(); // careful "ToString()" syntax!
//Print("Excel.Get({0},{1}): {2}", row, col, cellContent);
return cellContent;
}
catch (Exception e)
{
Print("Excel.Get("+row+","+col+") error: "+ e.Message);
return null;
}
}
else
{
Print("Excel.Get("+ row + ","+ col+") error: sheet is null");
return null;
}
}
但字符串返回为12345
.
提前致谢!