Hi Friends,
How do i add data from one excel sheet into another without any changes,I am having logos, images i want to add all.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Alex HeigPosted Feb 27, 2013, 2:59 AM
If you want to copy excel worksheet data from your code you may use a lot of libraries like Aspose, Elerium or other. I used this C# Excel Writer to work with excel files and it was very useful. But it is not free. I think this code will help in your case:
ExcelWorkbook Wbook = ExcelWorkbook.ReadXLS(@"c:\test.xls");
ExcelWorksheet Wsheet=Wbook.Worksheets.Add("Wsheet2");
ExcelWorksheet Wsheet=Wbook.Worksheets.Add("Wsheet2");
for (int i=0; i< Wbook.Worksheets["Wsheet1"].Rows.Count; i++)
{
for (int j=0; j
Wsheet.Cells[i,j] = Wbook.Worksheets["Wsheet1"].Cells[i,j];
}
}
Wsheet.Pictures = Wbook.Worksheets["Wsheet1"].Pictures;
Divya SaxenaPosted Jan 9, 2011, 11:19 PM
i think you want to add data one sheet to another excel sheet....so this is a simple steps...
1- Right click on below sheet-1(which you want to copy) and select MOVE OR COPY...small window will open
2- Select Sheet where you want to copy. (with in same Excel ) otherwise select from Top TO BOOK (drop down list) and copy into another excel work book.
NOTE: Below Check box CREATE A COPY...check if you want to copy..and if you dont so keep uncheck.
please find the attached File.