Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Im trying to couple GetOpenFilname with Import Text file wizard. i.e. Open a folder, select a text file, and import into an ActiveSheet in tab delimited form, Treating consecutive delimiters as one. -- Thank you Regards Aussie Bob C. Using Windows XP Home + Office 2003 Pro |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
After you get the file's name with GetOpenFilename use the OpenText method
to open it. -- Jim Rech Excel MVP "Robert Christie" wrote in message ... | Hi | | I'm trying to couple "GetOpenFilname" with "Import" Text file wizard. | i.e. | Open a folder, select a text file, and import into an ActiveSheet in tab | delimited form, Treating consecutive delimiters as one. | | -- | Thank you | | Regards | Aussie Bob C. | Using Windows XP Home + Office 2003 Pro |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jim
Help says OpenText Method opens file in a new Workbook. I need to open in Active Worksheet Cell A1. TIA Regards, Aussie Bob C. "Jim Rech" wrote: After you get the file's name with GetOpenFilename use the OpenText method to open it. -- Jim Rech Excel MVP "Robert Christie" wrote in message ... | Hi | | I'm trying to couple "GetOpenFilname" with "Import" Text file wizard. | i.e. | Open a folder, select a text file, and import into an ActiveSheet in tab | delimited form, Treating consecutive delimiters as one. | | -- | Thank you | | Regards | Aussie Bob C. | Using Windows XP Home + Office 2003 Pro |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Just for general interest this snippet of code works ok for me: ChDir "C:\Data\Excel\School 2005\" MyDataFile = Application.GetOpenFilename("Text Files,*.Txt") With ActiveSheet.QueryTables.Add(Connection:="TEXT;" & MyDataFile, _ Destination:=Range("A1")) .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = 437 .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = True .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With Assuie Bob C. "Robert Christie" wrote: Hi Jim Help says OpenText Method opens file in a new Workbook. I need to open in Active Worksheet Cell A1. TIA Regards, Aussie Bob C. "Jim Rech" wrote: After you get the file's name with GetOpenFilename use the OpenText method to open it. -- Jim Rech Excel MVP "Robert Christie" wrote in message ... | Hi | | I'm trying to couple "GetOpenFilname" with "Import" Text file wizard. | i.e. | Open a folder, select a text file, and import into an ActiveSheet in tab | delimited form, Treating consecutive delimiters as one. | | -- | Thank you | | Regards | Aussie Bob C. | Using Windows XP Home + Office 2003 Pro |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I import text file of cash flow to excel file then use formula | Excel Discussion (Misc queries) | |||
Set Defaults in File Import of a Text File | Excel Worksheet Functions | |||
Would Like to Automate Batch File Creation and Text FIle Import | Excel Discussion (Misc queries) | |||
Import text file into excel with preset file layout, delimeters VBA | Excel Programming | |||
Get External Data, Import Text File, File name problem | Excel Programming |