PC Review


Reply
Thread Tools Rate Thread

Recognize pipes "|" in when opening a delimited file in Excel

 
 
=?Utf-8?B?Q2FsZWI=?=
Guest
Posts: n/a
 
      8th Apr 2005
Automatically open delimited files without having the 3-step input box and
include pipes "|" in the delimiting characters.
 
Reply With Quote
 
 
 
 
Jason Morin
Guest
Posts: n/a
 
      8th Apr 2005
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Pipe Delimited Text File To Tab Delimited Text file Probie Coder Microsoft Access VBA Modules 5 3rd Dec 2009 06:56 AM
Converting Tab Delimited Text File to A Comma Delimited Text File kwesi.acquah@gmail.com Microsoft Excel Programming 1 13th Jun 2007 03:13 PM
Why is StringBuilder changing pipes to "o" umlaut when loading a pipe-delimited string? Ray Stevens Microsoft C# .NET 2 22nd Apr 2005 05:15 PM
Export with pipes delimited but keep fixed length!?! Sally Microsoft Access Getting Started 1 10th Feb 2004 01:54 PM
Export a table to a text file pipes delimited Sally Microsoft Access Getting Started 1 9th Feb 2004 02:48 PM


Features
 

Advertising
 

Newsgroups
 


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