Copy Excel sheet1 data into another Excelsheet2

Posted by Mahendrabasutkar under C# on 6/22/2011 | Points: 10 | Views : 12197 | Status : [Member] | Replies : 4
How to copy Excel sheet1 data into another Excelsheet2 using C#.
Excelsheet2 does not exist initially, we need to create it.But how to do both the scenarios.


Thanks&Regards
mahendrabasutkar




Responses

Posted by: Lakn2 on: 6/22/2011 [Member] Starter | Points: 25

Up
0
Down
try this

http://support.microsoft.com/kb/306023

Thanks&Regards
LakshmiNarayana Nalluri.

Mahendrabasutkar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 6/22/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
        Dim objExcelApplication As New Microsoft.Office.Interop.Excel.Application

Dim objWorkBook As Microsoft.Office.Interop.Excel.Workbook
Dim objWorkSheet As Microsoft.Office.Interop.Excel.Worksheet
Dim objRange As Microsoft.Office.Interop.Excel.Range

objWorkBook.Sheets(1).Copy(After:=objWorkBook.Sheets(2))


Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Mahendrabasutkar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 6/22/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
try these links

http://support.microsoft.com/kb/306023

http://support.microsoft.com/kb/306022

Thanks
Karthik
www.f5Debug.net

Mahendrabasutkar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response