MS Excel 科学计数法(示例:2.231321654E+01)
我正在编辑旧版 Visual Basic 6.0 程序。它从 GPIB 仪器读取数据并获取以科学计数法表示的原始字符串。例如:
2.231321654E+01
程序中的另一行处理该字符串,以便它适合输入到电子表格中:
Round(2.231321654E+01, 1)
返回 22.3
我想要有 2 位小数:
Round(2.231321654E+01, 2)
应该 返回22.31
,但是不,它返回22.3
。为什么?
另一种方法:
我尝试绕过 Round()
处理,让程序将原始字符串直接输入到电子表格中。我仍然得到 22.3
另一种方法:
我完全绕过了该程序,并手动将 2.231321654E+01
输入到电子表格中的任何单元格中。我仍然得到 22.3
摘要:
我想在电子表格中写入 2 位小数。我该怎么做?我认为原作者操纵了单元格编号属性,只保留小数点后一位。我该如何操纵它?我应该在代码中寻找什么?
I am editing a legacy Visual Basic 6.0 program. It reads from a GPIB instrument and obtains a raw string in scientific notation. For example:
2.231321654E+01
Another line in the program processes that string so that it would be suitable for input into the spreadsheet:
Round(2.231321654E+01, 1)
returns 22.3
I want to have 2 decimal places:
Round(2.231321654E+01, 2)
should return 22.31
, but NO, it returns 22.3
. Why?
Another approach:
I tried to bypass the Round()
processing and have the program input the raw string directly into the spreadsheet. I still get 22.3
Yet another approach:
I bypassed the program entirely and manually input 2.231321654E+01
into any cell in the spreadsheet. I still get 22.3
Summary:
I want to write 2 decimal places into the spreadsheet. How do I do it? I think the original author manipulated the cell number properties to retain only up to one decimal place. How do I manipulate it? What should I look for in the code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能是这样的
It's probably something like