如何禁用Excel自动识别数字和文字 [英] How to disable Excel's auto recognition of numbers and text
问题描述
例如 33E105
成为 33 * 10 ^ 105
这实际上是一个ID,而不是一个数字。
如何在打开CSV文件时在Excel中禁用此功能?或者我需要使用excel-python库来输出一个excel文件,并自己指定格式?
我还发现了一个类似的问题没有很好的答案在网络上。
谢谢!
写实际 .xls
在Python中的文件,而不是 .csv
Excel可能会误解的文件,可以使用 xlwt 第三方Python包。
I used Python to generate a CSV file. But when I open it in Excel, Excel will auto recognize a string into a number if it could be converted.
e.g.33E105
becomes 33*10^105
, which is actually an ID, not a number.
How to disable this in Excel while opening a CSV file? Or I need to resort to a excel-python library to output a excel file and specify the format myself?
I also found a similar question without good answers on the web.
Thanks!
To write actual .xls
files in Python, rather than .csv
ones that Excel might misinterpret, you can use the xlwt third-party Python package.
这篇关于如何禁用Excel自动识别数字和文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!