Stop Excel from automatically converting certain text values to dates

前端 未结 30 2986
别跟我提以往
别跟我提以往 2020-11-22 04:16

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?

I\'m trying to write a .csv fil

30条回答
  •  温柔的废话
    2020-11-22 04:58

    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",="more text"

    EDIT (according to other posts): because of the Excel 2007 bug noted by Jeffiekins one should use the solution proposed by Andrew: "=""2008-10-03"""

提交回复
热议问题