Reading data from an excel sheet and writing to another
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 |
Reading data from an excel sheet and writing to another
Rain wrote:
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. -- |
All times are GMT +1. The time now is 06:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com