Reading data from an excel sheet and writing to another

G

Guest

Hi,

I had read about reading data from a closed workBook, on this forum a while
ago.
Reference link:
http://www.rondebruin.nl/ado.htm

I am using this function as below:
GetDataSheet ThisWorkbook.Path & "\Book2.xls", "Sheet1", ActiveCell, True

I modified the function to the effect that the entire sheet gets selected
instead of a range of cells.

Kindly refer http://www.rondebruin.nl/ado.htm for function GetDataSheet

The data (Say) on Book2.Sheet1 is as below:

ABC 123 56 DEF 345 0.5
ABC 23 76 DEF 375 0.7
ABC 523 56 DEF 45 0.6

On the resulting sheet, the first row which contains numbers is getting
changed to
F(column number) as in

First Row: ABC F2 F3 DEF F4 F5

All I want is to copy data on a specified sheet on a workbook to the current
sheet without opening the source file.

Any thought?

TIA
 
J

Jamie Collins

Rain said:
Kindly refer http://www.rondebruin.nl/ado.htm for function GetDataSheet

On the resulting sheet, the first row which contains numbers is getting
changed to
F(column number) as in

First Row: ABC F2 F3 DEF F4 F5

Change HDR=Yes to HDR=No (HDR specifies whether the source has column
headers).

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top