Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Recognize pipes "|" in when opening a delimited file in Excel
Automatically open delimited files without having the 3-step input box and
include pipes "|" in the delimiting characters. |
#2
|
|||
|
|||
I recorded a macro, tweaked the code a little, and used
the workbook_open event: Sub Workbook_Open() Dim sPath As String Dim sFile As String sPath = "C:\Documents and Settings\jmorin\Desktop\" sFile = "test.txt" Workbooks.OpenText Filename:= _ sPath & sFile, _ Origin:=437, _ StartRow:=1, _ DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, _ ConsecutiveDelimiter:=False, _ Tab:=False, _ Semicolon:=False, _ Comma:=False, _ Space:=False, _ Other:=True, _ OtherChar:="|" End Sub --- Change sPath and sFile to your actual path and file. To use this macro, save it in ThisWorkbook module (Press ALT+F11). Save the file and close. Re-open. HTH Jason Atlanta, Ga -----Original Message----- Automatically open delimited files without having the 3- step input box and include pipes "|" in the delimiting characters. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trouble opening an Excel file that contains macros | Excel Worksheet Functions | |||
How do I export XLS to TXT delimited by '|'? | Excel Discussion (Misc queries) | |||
Comma delimited bank info | Excel Discussion (Misc queries) | |||
restrict opening Excel file residing on a shared drive to one user | Excel Discussion (Misc queries) | |||
Slow opening files - possible cause and solutoin | Excel Discussion (Misc queries) |