EPPLUS how to know the format of the Worksheet cell

前端 未结 2 1339
[愿得一人]
[愿得一人] 2021-01-21 16:00

I am using EPPlus to read excel sheets and load the data into datatable to perform further operations and then save back the modified data to the excel file.

The below c

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-21 16:20

    if you want to know current cell format, why dont you use ExcelNumberFormat class?

    var style=oSheet.Cells[i, j].style;
    string format=style.Numberformat.Format;
    

    This will give you current cell format, i.e, "YYYY-MM-ffffdd" , "%#.##", and so on.

提交回复
热议问题