Results 1 to 4 of 4

Thread: Copy data from one workbook to another

  1. #1
    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).

  2. #2
    Join Date
    May 2008
    Posts
    4,831

    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

  3. #3
    Join Date
    Apr 2008
    Posts
    4,088

    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.

  4. #4
    Join Date
    May 2008
    Posts
    4,570

Similar Threads

  1. Replies: 2
    Last Post: 24-01-2012, 05:08 PM
  2. Replies: 3
    Last Post: 11-07-2011, 10:37 AM
  3. Import data from another workbook
    By Chhaya in forum Software Development
    Replies: 3
    Last Post: 03-10-2009, 06:59 PM
  4. Extract data from one workbook to another
    By Laler in forum Windows Software
    Replies: 3
    Last Post: 18-05-2009, 04:56 PM
  5. How to enter Data in Shared Excel Workbook
    By Kamran in forum Windows Software
    Replies: 3
    Last Post: 30-04-2009, 11:44 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,389,056.19278 seconds with 16 queries