Results 1 to 5 of 5

Thread: Copy large data from Access to Excel *SOLVED*

Threaded View

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Copy large data from Access to Excel *SOLVED*

    I have about 5000 records I need to copy into an existing excel spreadsheet from an Access table. I have tried the below but it is way to slow. Does any one know of a much quicker way I can paste the 5000 records into Excel?

    Thanks.

    Code:
    Do Until rsSelectedTrades.EOF = True
    objExcel.Cells(RowActive, 80).Value = rsSelectedTrades!ShareCode 'Column 80 is CB
    objExcel.Cells(RowActive, 81).Value = rsSelectedTrades!StockTradeNo
    objExcel.Cells(RowActive, 82).Value = rsSelectedTrades!EntryDate
    objExcel.Cells(RowActive, 83).Value = rsSelectedTrades!Enter
    objExcel.Cells(RowActive, 84).Value = rsSelectedTrades!Direction
    objExcel.Cells(RowActive, 85).Value = rsSelectedTrades!Exit
    objExcel.Cells(RowActive, 86).Value = rsSelectedTrades!HoldPeriod
    objExcel.Cells(RowActive, 87).Value = rsSelectedTrades!Profit
    objExcel.Cells(RowActive, 88).Value = rsSelectedTrades!ProfitPer
    objExcel.Cells(RowActive, 89).Value = rsSelectedTrades!Other
    objExcel.Cells(RowActive, 90).Value = rsSelectedTrades!Signal
    objExcel.Cells(RowActive, 91).Value = rsSelectedTrades!ExitDate 'Column 91 is CM
    
    rsSelectedTrades.MoveNext
    objExcel.ActiveCell.Offset(1, 0).Select
    RowActive = RowActive + 1
    Loop
    Last edited by lintz; Mar 22nd, 2004 at 02:26 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width