How to convert “double” to “datetime” between Excel and c#

前端 未结 4 1002
执笔经年
执笔经年 2021-01-23 22:10

I have a c# program which needs to create an excel object, and do some operations, here are parts of my code:

// c# code:

workSheet.Cells[1, 1] = \"=2012/9/20\         


        
4条回答
  •  不知归路
    2021-01-23 22:51

    If you want to store a literal or preformatted value in an Excel cell, precede the value with a single quote '. For example, workSheet.Cells[1, 1] = "'2012/9/20";.

提交回复
热议问题