0

Is it possible to copy selected ranged cells of one workbook to another using NPOI in C#? If yes, can I have sample of how it is done? So far, I am stuck with: sheet.SetActiveCellRange(0,3,0,3);

I am not sure how to move forward from this code. Thank you.

hassan.ef
  • 1,300
  • 2
  • 11
  • 19
jr0115
  • 31
  • 1
  • 4
  • I doubt there's a built-in copy & paste in NPOI. I'd guess you'd have to just iterate through the range of cells and create / copy them individually in the new workbook. It might be possible to work as a range too. But I don't think it matters that the range is active at all. – Rup May 21 '19 at 07:01
  • Thanks @Rup! I think I can do the iteration. As I search, there is only sheet.CopyRow(int sourceIndex, int targetIndex). How to do the CopyRow properly to a separate workbook? – jr0115 May 21 '19 at 07:54

0 Answers0