ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find Text File Import Cell (https://www.excelbanter.com/excel-programming/336665-find-text-file-import-cell.html)

ExcelMonkey

Find Text File Import Cell
 
If you import data from a CSV or text file, is it possible to tell which cell
is the target import cell in VBA. That is, when I set up the import, I
assign A1 on Sheet1 as the cell. Is there any way in VBA to tell when
looping through sheets if there is a cell within the Used Range that has been
designated for a text file import? I know you can do it with web queries.

Thanks

keepITcool

Find Text File Import Cell
 

you dont import a csv file
you open it as a new workbook.

so: no go (but you can copy the data
from the newly opened workbook to the location your want
in an existing workbook.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


ExcelMonkey wrote :

If you import data from a CSV or text file, is it possible to tell
which cell is the target import cell in VBA. That is, when I set up
the import, I assign A1 on Sheet1 as the cell. Is there any way in
VBA to tell when looping through sheets if there is a cell within the
Used Range that has been designated for a text file import? I know
you can do it with web queries.

Thanks


Tom Ogilvy

Find Text File Import Cell
 
You can import a textfile like any other "database" It would create a
querytable in Excel.

Instructions for xl2003 (introduced as a menu capability in xl2000)
On the Data menu, point to Import External Data and then click Import Data
to open the Select Data Source dialog box.
In the Select Data Source dialog box, in the Files of type list, select
Text Files.

Then, in the Look in list, navigate to the folder containing the file you
want and select the text file you want to import. The file might be on your
hard drive, a local network, or a disk.

http://office.microsoft.com/training...RC011801181033


To the OP.

You could look at the querytable objects on the sheets.
--
Regards,
Tom Ogilvy

"keepITcool" wrote in message
.com...

you dont import a csv file
you open it as a new workbook.

so: no go (but you can copy the data
from the newly opened workbook to the location your want
in an existing workbook.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


ExcelMonkey wrote :

If you import data from a CSV or text file, is it possible to tell
which cell is the target import cell in VBA. That is, when I set up
the import, I assign A1 on Sheet1 as the cell. Is there any way in
VBA to tell when looping through sheets if there is a cell within the
Used Range that has been designated for a text file import? I know
you can do it with web queries.

Thanks




keepITcool

Find Text File Import Cell
 
Hi Tom,

you missed s't: OP said..
"I know you can do it with web queries."


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Tom Ogilvy wrote :

You can import a textfile like any other "database" It would create
a querytable in Excel.

Instructions for xl2003 (introduced as a menu capability in xl2000)
On the Data menu, point to Import External Data and then click Import
Data to open the Select Data Source dialog box.
In the Select Data Source dialog box, in the Files of type list,
select Text Files.

Then, in the Look in list, navigate to the folder containing the
file you want and select the text file you want to import. The file
might be on your hard drive, a local network, or a disk.

http://office.microsoft.com/training...ID=RP011801251
033&CTT=6&Origin=RC011801181033


To the OP.

You could look at the querytable objects on the sheets.


Tom Ogilvy

Find Text File Import Cell
 
No, I don't believe I missed that - in fact that is what made me think the
OP is referring to what I described, which is the same mechanism as a web
query.

--
Regards,
Tom Ogilvy

"keepITcool" wrote in message
.com...
Hi Tom,

you missed s't: OP said..
"I know you can do it with web queries."


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Tom Ogilvy wrote :

You can import a textfile like any other "database" It would create
a querytable in Excel.

Instructions for xl2003 (introduced as a menu capability in xl2000)
On the Data menu, point to Import External Data and then click Import
Data to open the Select Data Source dialog box.
In the Select Data Source dialog box, in the Files of type list,
select Text Files.

Then, in the Look in list, navigate to the folder containing the
file you want and select the text file you want to import. The file
might be on your hard drive, a local network, or a disk.

http://office.microsoft.com/training...ID=RP011801251
033&CTT=6&Origin=RC011801181033


To the OP.

You could look at the querytable objects on the sheets.





All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com