Excel interop - how to stop number (stored as text) being “evaluated”

前端 未结 4 1196
梦如初夏
梦如初夏 2021-01-13 09:24

I was wondering if anyone had come across the following problem and had any ideas on how to resolve it: I\'m exporting data from a C# application (.NET 3.5) to Excel (2003)

4条回答
  •  星月不相逢
    2021-01-13 09:49

    Add a single apostrophe ' before the number. Excel will then treat the number as a string.

提交回复
热议问题