Set cell value using Excel interop

后端 未结 4 665
孤街浪徒
孤街浪徒 2020-12-17 10:20

Ok, so I\'m trying to set the value of a cell with the excel interop library. I am able to do it with the following:

sheet.Cells[row, col] = value;
<         


        
4条回答
  •  难免孤独
    2020-12-17 10:41

    Your first method should work fine for any reasonable (and a lot of unreasonable) amounts of cells, provided you have disabled screen updating (Application.ScreenUpdating = false). The Knowledgebase Article describing how to set cells using C# accesses by row and column as well.

提交回复
热议问题