LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default FTP Accessing remote files where filenames are unknown

Hi Al

I worked out a way to do this that was just fine ... then my host decided to implement passive ftp transfers and so now it doesn't work :( ... Previously I opened a dummy file whose name I knew using ..

Workbooks.OpenText (ftpURL + ftpRootDirectory + "dummy.txt"
Close '[ not sure that this is necessary ... but what the heck
Workbooks("dummy.txt").Close (False

... this got me a password dialogue box (which is good in this application) .. and then I accessed the list of files with ..

With ActiveSheet.QueryTables.Add(Connection:=
"TEXT;" + ftpURL + ftpRootDirectory, Destination:=Range("A1")
.FieldNames = Fals
.RowNumbers = Fals
.FillAdjacentFormulas = Fals
.PreserveFormatting = Fals
.RefreshOnFileOpen = Fals
.RefreshStyle = xlInsertDeleteCell
.SavePassword = Fals
.SaveData = Tru
.AdjustColumnWidth = Fals
.RefreshPeriod =
.TextFilePromptOnRefresh = Fals
.TextFilePlatform = 125
.TextFileStartRow =
.TextFileParseType = xlDelimite
.TextFileTextQualifier = xlTextQualifierNon
.TextFileConsecutiveDelimiter = Fals
.TextFileTabDelimiter = Tru
.TextFileSemicolonDelimiter = Fals
.TextFileCommaDelimiter = Fals
.TextFileSpaceDelimiter = Fals
.TextFileColumnDataTypes = Array(xlTextFormat
.TextFileTrailingMinusNumbers = Fals
.Refresh BackgroundQuery:=Fals
End Wit

... which put the list in an emptied worksheet from where I could parse the list and open each file of interest explicitly using the same method

Now that passive ftp is required Excel hangs (of course) on the ...

Workbooks.OpenText (ftpURL + ftpRootDirectory + "dummy.txt"

All help appreciated, thank

Gly



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel files in my docs have numbered filenames and are duplicates sss Setting up and Configuration of Excel 1 December 11th 07 11:37 PM
Accessing cells in other files [email protected] Excel Discussion (Misc queries) 4 October 5th 06 02:32 PM
using wildcard characters for filenames in externally linked files Harold Good Excel Discussion (Misc queries) 0 June 27th 06 03:40 AM
why are the help files now remote? Sean Excel Discussion (Misc queries) 2 April 1st 06 10:11 PM
Acquiring filenames for multiple files with GetOpenFilename John Excel Programming 1 December 17th 03 06:51 AM


All times are GMT +1. The time now is 11:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"