Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 16-05-2009
Member
 
Join Date: Apr 2009
Posts: 87
Copy data from one workbook to another

i have installed windows xp. I would like to know how to copy data from one one sheet to another, suppose copy data of sheet 1 within the excel file ( file1.xls ) to the the file2.xls in excel 2003. That means this both sheet belongs to different spreadsheet(Excel).
Reply With Quote
  #2  
Old 16-05-2009
Member
 
Join Date: May 2008
Posts: 4,829
Re: Copy data from one workbook to another

Use this script to copy data from one sheet to another :

Code:
Set objExcel = CreateObject("Copy File.Application")
objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Open("c:\Scripts\Test.xls")
Set objWorksheet = objWorkbook.Worksheets("sheet number 1")

Set objRange = objWorksheet.Range("A1:A20")
objRange.Copy

Set objExcel2 = CreateObject("Copy File.Application")
objExcel2.Visible = True

Set objWorkbook2 = objExcel2.Workbooks.Add
Set objWorksheet2 = objWorkbook2.Worksheets("sheet number 1")

objWorksheet2.Paste
Reply With Quote
  #3  
Old 16-05-2009
Member
 
Join Date: Apr 2008
Posts: 4,086
Re: Copy data from one workbook to another

There is another way to do this. Select view tab in the workbook from which you want to copy. Click on select Macros then record macro. After that copy data from workbook and paste in to 2nd workbook where you changed all that setting. After copying data click on stop recording button. In this way can copy data from one workbook to another.
Reply With Quote
  #4  
Old 16-05-2009
Member
 
Join Date: May 2008
Posts: 4,565
Re: Copy data from one workbook to another

Check this thread :
How to move data from one excel spreadsheet to another automatically?
How to copy specific rows to another sheet
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Copy data from one workbook to another"
Thread Thread Starter Forum Replies Last Post
How to copy colors from another workbook to new in Microsoft Excel Talisha MS Office Support 2 24-01-2012 05:08 PM
How can I use VBA to copy data from the closed workbook to the open workbook on Microsoft Excel 2010? Borislav Windows Software 3 11-07-2011 10:37 AM
Import data from another workbook Chhaya Software Development 3 03-10-2009 06:59 PM
Extract data from one workbook to another Laler Windows Software 3 18-05-2009 04:56 PM
How to enter Data in Shared Excel Workbook Kamran Windows Software 3 30-04-2009 11:44 AM


All times are GMT +5.5. The time now is 01:25 AM.