![谷歌如何在页面禁用输入法](https://i-blog.csdnimg.cn/blog_migrate/92d74ba83587c17e33e162742eaecb19.png)
谷歌如何在页面禁用输入法
![Google Sheets icon](https://i-blog.csdnimg.cn/blog_migrate/746b3ae6eab330688a581c98ff081534.png)
When entering numbers into Google Sheets, leading zeros are removed by default. This can be problematic for ZIP codes, phone numbers, and IDs that you type into a cell. Here’s how you can keep leading zeros.
在Google表格中输入数字时,默认情况下会删除前导零。 对于您在单元格中键入的邮政编码,电话号码和ID,这可能会出现问题。 这是保持前零的方法。
键入时保持前导零 (Keep Leading Zeros as You Type)
If you want to keep a leading zero on the fly, you can enter an apostrophe (‘) before you enter the number that begins with zero.
如果要动态保留前导零,则可以在输入以零开头的数字之前输入撇号(')。
![When typing in a number that has a leading zero, place an apostrophe (') at the beginning of the number.](https://i-blog.csdnimg.cn/blog_migrate/aa4979ae0ed2680ec3bc946748a6e4d1.png)
The apostrophe acts as an escape character and tells Sheets to ignore its programming that trims leading zeros.
撇号充当转义字符,并告诉Sheets忽略其修剪前导零的编程。
Press the Enter key, and the number will show in the cell without displaying the apostrophe at the beginning. You can even still use the number in formulas without having to worry about it breaking the calculation because of the extra character.
按Enter键,该数字将显示在单元格中,但开头不显示撇号。 您甚至还可以在公式中使用数字,而不必担心由于多余的字符而破坏计算。
![While the formula editor has the apostrophe, the cell doesn't actually show it.](https://i-blog.csdnimg.cn/blog_migrate/02fd55a9e5c26b623d955c3d87084011.png)
应用纯文本格式 (Apply Plain Text Formatting)
If you don’t feel like entering an apostrophe every time you type a number with a leading zero, you can format the cells beforehand as plain text. By applying plain text formatting in advance, you can save time and not worry about a zero disappearing.
如果您不想每次输入带前导零的数字时都输入撇号,则可以预先将单元格设置为纯文本格式。 通过预先应用纯文本格式,可以节省时间,而不必担心零消失。
First, select the range of cells you want to format as plain text.
首先,选择要设置为纯文本格式的单元格范围。
![Select all the cells where you want to apply the formatting to first.](https://i-blog.csdnimg.cn/blog_migrate/c84302307f81a96423f26f7da94ed615.png)
Next, click Format > Number and then select “Plain Text” from the list.
接下来,单击格式>数字,然后从列表中选择“纯文本”。
![Next, click Format > Number, and then click on "Plain text."](https://i-blog.csdnimg.cn/blog_migrate/66bf5a19c2e8f969f1419b9424ce6d56.png)
Now, anything you enter into the cell will show exactly how you type it in plain text.
现在,您输入到单元格中的所有内容都会准确显示您以纯文本键入的方式。
应用自定义数字格式 (Apply a Custom Number Format)
Another approach is to apply a custom number format to anything you might enter into a cell. If you have a number that’s precisely five digits long—like a ZIP code—you can format the cells to display only that many numbers.
另一种方法是将自定义数字格式应用于您可能会在单元格中输入的任何内容。 如果您的数字正好是5位数字(例如邮政编码),则可以设置单元格的格式以仅显示那么多数字。
A couple of caveats to note: If you enter only three numbers, Sheets adds two leading zeros for you; if you enter more than five, Sheets will cut off anything over the specified limit.
需要注意的两个注意事项:如果仅输入三个数字,则Sheets会为您添加两个前导零。 如果您输入五个以上,则表格会截断超过指定限制的任何内容。
For example, entering “9808309” would trim the first two off and display only “08309” because those are the last five digits in the number.
例如,输入“ 9808309”将删掉前两位并仅显示“ 08309”,因为这些是数字的最后五位。
Just as with the previous method, you should apply this format preemptively to avoid any potential zero trimming.
与以前的方法一样,您应抢先应用此格式,以避免任何可能的零修整。
First, select the range of cells you want to format as plain text.
首先,选择要设置为纯文本格式的单元格范围。
![Select all the cells where you want to apply a custom number format to first.](https://i-blog.csdnimg.cn/blog_migrate/c84302307f81a96423f26f7da94ed615.png)
Next, click Format > Number > More formats and click on “Custom Number Format” from the list.
接下来,单击格式>数字>其他格式,然后从列表中单击“自定义数字格式”。
![Next, click Format > Number > More Formats, and then choose "Custom number format" from the list.](https://i-blog.csdnimg.cn/blog_migrate/4509216eb79f2defcc7c1ec5caf8e82d.png)
Here, you can enter your own customized way to format numbers. The Google Docs help center has a list of common syntax characters to help you create simple or complex number formats.
在这里,您可以输入自己的自定义方式来格式化数字。 Google文档帮助中心提供了常用语法字符列表,可帮助您创建简单或复杂的数字格式。
For our example, we want to format our entry as a five-digit number. So, type five zeros into the text field provided and then click “Apply” to create the new number format.
对于我们的示例,我们希望将条目的格式设置为五位数字。 因此,在提供的文本字段中键入五个零,然后单击“应用”以创建新的数字格式。
![Enter five zeros into the text field and click "Apply" to create the custom format.](https://i-blog.csdnimg.cn/blog_migrate/c72ec0f26dd55dce8ca94fa1cc499e1b.png)
Using five zeros will force those cells to have a fixed length regardless of what you enter into them and add an insignificant 0 for each missing digit.
使用五个零将强制这些单元格具有固定的长度,而不管您输入什么,并为每个丢失的数字添加一个微不足道的0。
![Perfectly formatted ZIP codes.](https://i-blog.csdnimg.cn/blog_migrate/f07f53c713316a72d2f5885bab65de3b.png)
Sheets’ number formatting is a powerful tool that lets you format ZIP codes, phone numbers, and ID numbers that could contain a leading zero without worrying about it getting left out.
工作表的数字格式设置功能强大,可让您格式化可能包含前导零的邮政编码,电话号码和ID号码,而不必担心它会被遗漏。
翻译自: https://www.howtogeek.com/470254/how-to-enter-zero-before-a-number-in-google-sheets/
谷歌如何在页面禁用输入法