copying of specific range of excel cells from one worksheet to another worksheet

前端 未结 3 2149
Happy的楠姐
Happy的楠姐 2020-12-15 10:01

I am writing a C# program which copies a range of cells from a worksheet of one workbook to a worksheet of an other workbook. But the problem I am facing is I am only able t

3条回答
  •  轮回少年
    2020-12-15 10:54

    For the First part of setting the same value for the entire range, instead of looping following will work out

    range1 = workSheet.get_Range("A1:B100"); range1.Value = "Fixed";

    And for copying you can try what @mrtig has suggested.

提交回复
热议问题