Exporting the values in List to excel

后端 未结 12 1433
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 18:36

Hi I am having a list container which contains the list of values. I wish to export the list values directly to Excel. Is there any way to do it directly?

12条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-05 19:25

    Fast way - ArrayToExcel (github)

    byte[] excel = myList.ToExcel();
    File.WriteAllBytes("result.xlsx", excel);
    

提交回复
热议问题