Google表格未识别数字(有时)
我有一个表格,可以使用编码的字符串(base64),对其进行解码,并以可读的格式显示。最近,我遇到了一个问题,即它没有正确识别一个数字,但有时只有有时。这个问题似乎非常不一致,我无法确定发生这种情况的原因。在这一点上,我已经对此进行了广泛的研究,但没有解决。
以下是正在发生的事情的一些示例。
这是工作情况的一个例子。盒装红色的数字是给我问题的单元格(也是唯一的单元格)。在此示例中,它被正确识别为一个数字,并因此而被视为。该数字是由于在单元格> f6 上执行的拆分公式的结果(一个带有可见标头“ cookie”的结果)。
这是一个破裂的例子。红色盒装的数字与上图相同,但从其他输入的base64字符串中解析。该单元不是不是被视为一个数字,而是出于明显的原因。
以下是上面的第一个和第二个图像的单元格> f6 中的数据。该字符串由半隆分开。问题是由字符串中的第二个数字引起的。为了澄清这些数字的位置,我添加了箭头(>><<
)。
Works:
159149865299613.8;>>5793819823521370<<;10338;125;267962864851035.03;3488;0;0;0;0;0;0;66;52081;0;125;0;0 ; 0; 0; 0; 0;; 0; 0; 0; 0; 0; 0; 0; 0; -1; -1; -1; -1; -1; -1; 0; 0; 0; 0; 0; 0; 0; 50》; 0; 0; 0; 0 ; 0; 1; 20; 1655298213526; 0; 0;;; 41; 0; 0; 37459253051.48866; 50; 50;
不起作用:
17055034466625.7646; 268041654659599.25; 3733; 0; 0; 0; 0; 0; 0; 0; 0; 0; -1; -1; 0; 130; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0》 0; -1; -1; -1; -1; -1; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 2; 2; 1655384614318; 0; 0; 0; 0;;;;; 41; 0; 0》; 0; 4853068632.17037; 50;
此表中的其他每个数字都被识别为数字和功能正常。> 。
以下是查看此确切的电子表格的链接。制作纸的副本后,您可以通过从savedata
sheet(A列A)复制保存代码并将其粘贴到主表中的框中(请务必粘贴值粘贴)来查看不同的值仅,而不是格式化)。
” ,虽然我不相信这是问题,因为它甚至在运行之前就破裂了,但无论如何我都将标签包括在内,以防万一我错过了一些简单的东西。
I have a sheet that takes in an encoded string (Base64), decodes it, and displays it in a readable format. I have just recently come across an issue where it does not properly recognize a number, but only sometimes. The issue appears to be very inconsistent, and I have not been able to pin down why it is happening. I have researched this extensively at this point, but have come to no resolution.
Below are some examples of what is happening.
This is an example of a working situation. The number boxed in red is the cell (and only cell) that has been giving me issues. In this example, it is correctly recognized as a number, and treated as such. That number is a result of a split formula being performed on cell F6
(the one with the visible header "cookie").
This is an example of a broken situation. The number boxed in red is the same cell as the previous image, but parsed from a different inputted Base64 string. This cell is not being treated as a number, but for no apparent reason.
Below is the data in cell F6
for the first and second images above, respectively. This string is split by semicolon. The problem is caused by the second number in the string. Arrows (>><<
) have been added by me in order to clarify the position of these numbers.
Works:
159149865299613.8;>>5793819823521370<<;10338;125;267962864851035.03;3488;0;0;0;0;0;0;66;52081;0;125;0;0;0;0;0;0;;0;0;0;0;0;0;0;-1;-1;-1;-1;-1;0;0;0;0;50;0;0;1;20;1655298213526;0;0;;41;0;0;37459253051.48866;50;
Does not work:
1705503446625.7646;>>7977823485117074<<;10364;130;268041654659599.25;3733;0;0;0;0;0;0;0;-1;0;130;0;0;0;0;0;0;;0;0;0;0;0;0;0;-1;-1;-1;-1;-1;0;0;0;0;50;0;0;2;21;1655384614318;0;0;;41;0;0;48530698632.17037;50;
Every other number in this sheet is recognized as a number and functions properly.
Below is a link to view this exact spreadsheet. Upon making a copy of the sheet, you can view the different values by copying the Save Code from the SaveData
sheet (column A) and pasting them in the box in the Main sheet (make sure to paste values only, and not formatting).
There are a few App Scripts running in this sheet, and while I don't believe those are the issue since it's breaking before they are even run, I included the tag anyway just in case there is something simple I have missed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
恕我直言Google表不打算能够处理任何数字(作为数字)。
根据奥斯汀对另一个问题的回答,Google Sheets可以用作数字的数字“最多15位”,从+308到 - - 308“。
奥斯汀的答案包括其他答案解释“精度”和“比例”概念,以了解上述引用所需的“精度”和“比例”概念。撇开概念和术语...
5793819823521370
和7977823485117074
有16位数字,但最后一个数字不一样。这很重要,因为它会影响该值是否由Google表作为文本或数字处理。5793819823521370
0的最后一个数字被任何其他数字替换,则它也被用作文本值。7977823485117074
4的最后一个数字被0替换为0。> 5793819823521370
和7977823485117070
(达到某些数量)的权利中添加更多0将使用工程符号在公式栏中显示,即5.79381982352137E+23
。注意:不幸的是,官方文档没有包含有关其功能 /限制的许多详细信息,但是野外有几篇文章,例如上面提到的奥斯汀答案,但要找到它们有些棘手。 电子表格可能会有所帮助,可能会有助于了解电子电子表格和其他可能会帮助您的历史为了改善您的“ Google fu”围绕电子表格的“ Google Fu”,这可能有助于找到有关Google表的特定内容。
结论
如果您将继续使用Google表来存储具有超过15位数字的数字,请准备通过使用
number(value)
或parseint(value)<的脚本将这些值转换为数字IE /代码>。
IMHO Google Sheets is not intended to be able to handle any number (as number).
According to Austin's answer to another question, Google Sheets can handle as number "up to 15 digits, scale from +308 to -308".
Austin answer includes a link to this other answer which explains the "precision" and "scale" concepts necessary to understand the above quote. Putting aside the concepts and terminology...
5793819823521370
and7977823485117074
have 16 digits, but the last one is not the same. This is relevant because it affects if the value is handled by Google Sheets as text or as a number.5793819823521370
, 0, is replaced by any other digit, it also is handled as a text value.7977823485117074
, 4, is replaced by 0, it is handled as a number.5793819823521370
and7977823485117070
(up to certain quantity) will not make the value to be handled as text instead of a number, but the value will be displayed in the formula bar using engineering notation, i.e.5.79381982352137E+23
.NOTE: Unfortunately the official documentation doesn't include many details about it's capabilities / limitations but there are several posts on the wild, like Austin's answer referred above, about them, but it's a bit tricky to find them. Spreadsheet might be helpful to learn about the history of the electronic spreadsheet and other stuff that could help you to improve your "Google Fu" around spreadsheets in general that might be helpful to find specific stuff about Google Sheets.
Conclusion
If you will keep using Google Sheets to store numbers having more than 15 digits, prepare your script to convert these values to a number i.e. by using
Number(value)
orparseInt(value)
.