停止Excel自动将某些文本值转换为日期 [英] Stop Excel from automatically converting certain text values to dates

查看:182
本文介绍了停止Excel自动将某些文本值转换为日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人碰巧知道是否有一个令牌,我可以添加到我的csv某个字段,所以Excel不会尝试将其转换为日期?

Does anyone happen to know if there is a token I can add to my csv for a certain field so Excel doesn't try to convert it to a date?

我正在尝试从我的应用程序写一个.csv文件,其中一个值恰好看起来像一个日期,Excel会自动将其从文本转换为日期。我已经尝试将所有的文本字段(包括一个看起来像日期的文本)放在双引号内,但没有任何效果。

I'm trying to write a .csv file from my application and one of the values happens to look enough like a date that Excel is automatically converting it from text to a date. I've tried putting all of my text fields (including the one that looks like a date) within double quotes, but that has no effect.

推荐答案

我发现在双引号之前加上'='可以完成你想要的。它强制数据为文本。

I have found that putting an '=' before the double quotes will accomplish what you want. It forces the data to be text.

eg。 =2008-10-03,=更多文字

eg. ="2008-10-03",="more text"

编辑(根据其他帖子):因为由Jeffiekins注释的Excel 2007错误应该使用安德鲁提出的解决方案=2008-10-03

这篇关于停止Excel自动将某些文本值转换为日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆