I have two per-existing workbooks. I need to copy data from Workbook1.Sheet1 to Workbook2.Sheet3. What is the syntax in Spire.xls?
What I am wanting to do...
WB1.S1 Copy Range ("A1:D100") to WB2.S3.Range("M1:P100")
Thanks.
Workbook workbook1 = new Workbook();
workbook1.LoadFromFile(FilePath + @"23089-1.xlsx");
Worksheet sheet1 = workbook1.Worksheets[0];
Workbook workbook2 = new Workbook();
workbook2.LoadFromFile(FilePath + @"23089-2.xlsx");
Worksheet sheet2 = workbook2.Worksheets[2];
//copy range
sheet1.Range["A1:D100"].Copy(sheet2.Range["M1:P100"], true, true);
workbook2.SaveToFile("T23089.xlsx", ExcelVersion.Version2013);