Excel date format using EPPlus

后端 未结 9 554
长情又很酷
长情又很酷 2020-12-18 17:44

I\'m having trouble with format my cells to Date.

FileInfo info = new FileInfo(path);
using (ExcelPackage package = new ExcelPackage(info))
{
      ExcelWork         


        
9条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-18 18:04

    I wanted to add that the setting of the format was the solution for me. But, I could not get it to work until I set the value property to a DateTime object and not a string. That was the key to making it all work.

提交回复
热议问题