0

i have three excel files like this place at this location.

string  path1=@"D:\\report\test1.xls";
string  path2=@"D:\\report\test2.xls";
string  path3=@"D:\\report\test3.xls";

now i need to copy all these excel files into 1 workbook.and save the workbook under this path

string strWorkPath=@"E:\report"; can anyone tell me how to achive this in C#,look for some code snippnets that can help me out. i am new to this excel opeartion.

any help would be great.

thanks

happysmile
  • 7,537
  • 36
  • 105
  • 181

1 Answers1

0

You need to use the Excel library, heres some examples of how to do it:

How to copy one worksheet to another WorkBook

Excel Copy WorkSheet Method

Excel Interop Use

Iain Ward
  • 9,850
  • 5
  • 34
  • 41