Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I want to import a textfile to excel worksheet. Problem is, that I want the imported data to begin in the first empty cell in column A. How do I do this? So far the macro is: Sub data_import() With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\O pticon\Data\Data.txt" _ , Destination:=Range("A1")) .Name = "Data" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = False .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = 850 .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = True .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1, 1, 1) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With End Sub Thanks, Elina |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formatting a text file imported into excel | Excel Worksheet Functions | |||
can I display the file name of the imported text file in another c | Excel Discussion (Misc queries) | |||
Parsing imported text file with macro... help! | Excel Programming | |||
Imported Text File Worksheet Tab Name | Excel Programming | |||
if then elseif on text file imported into excel | Excel Programming |