Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
import data
how can I import data from another excel file into an existing excel file.
what would the code look like. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
import data
Turn on the macro recorder.
Open both files copy and paste from one worksheet to another (different workbooks) stop the recording look at the code. I think if you do something like this, you'll see the workbook/worksheet names that you need. Post back with any questions you have after you do it. === This is what I would do with both workbooks open. dim fRng as range dim tRng as range with workbooks("book1.xls").worksheets("sheet1") set frng = .range("a1:g9") end with with workbooks("book2.xls").worksheets("sheet1") set trng = .cells(.rows.count,"A").end(xlup).offset(1,0) end with frng.copy _ destination:=trng === It copies the range, but pastes to the first available cell in column A of the second worksheet. luc wrote: how can I import data from another excel file into an existing excel file. what would the code look like. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
import XML data...Is there a size limit on the import? | Excel Discussion (Misc queries) | |||
How to Start Excel in Text Import Wizard for data import | Setting up and Configuration of Excel | |||
Import external data, data includes Excel function | Excel Worksheet Functions | |||
Tool bar: Data/Import external data/New database query | Setting up and Configuration of Excel | |||
how to Import data in excel office2003 with data more 65000 rows | Excel Worksheet Functions |