Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open tab text file method
i use "open file for input" method to import text from text file to excel.
however it import the text as a whole line, without any tab separation. is there any method i can reserve the "TAB" from text file to Excel. Thanks. tony |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open tab text file method
i use "open file for input" method to import text from text file to
excel. however it import the text as a whole line, without any tab separation. is there any method i can reserve the "TAB" from text file to Excel. One solution would be to open a blank workbook, turn on the macro recorder (have the macro recorded in the current blank workbook) and go through manually what you do when you import the text file, remmebering to set Tab as the delimiter. Then look at the code generated and edit the macro if need be, if it needs generalising. The code that opens the text file will look something like this: Workbooks.OpenText Filename:="<Your txt filename", dataType:=xlDelimited, tab:=True ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open CSV file, format data and write output to a text file. | Excel Programming | |||
method 'open text' of object 'workbooks' failed | Excel Programming | |||
How do I import text file, analyze data, export results, open next file | Excel Programming | |||
Excel VBA - open text file, replace text, save file? | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming |