ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Define Excel delimiter by file extension (https://www.excelbanter.com/excel-discussion-misc-queries/52978-define-excel-delimiter-file-extension.html)

Robbie

Define Excel delimiter by file extension
 
Exel 2000 on XP Professional
I have a server than produces pipe ( | ) separated text files. The files
all end in .psv (pipe separated vaules).
I would like to be able to click on one of these files and have Excel open
the file and parse it much the same way it does .csv files.
I have defined the file type, but I do not know of any way to pass values to
Excel telling it to open files of this type as pipe separated text files.
--
Rob White
Louisville, KY

Jim Sweet

Define Excel delimiter by file extension
 
The import text wizard can be set to parse a pipe delim file.

Do a File Open, set the file dialog for All files by clicking the "Files of
Type" dropdown and choosing the All files option. This allows your .psv file
to display in the dialog.

Select your file and the Import Text Wizard will open. In Step 1, make sure
that the Delimited option is selected. Click Next for Step 2. Choose the
"Others" box in the delimiters section. The choice will move your cursor to
the box to the right of "others". Key your pipe character in this box and the
parsed text will show in the bottom window. Click Next to go to step 3. You
can designate formats for the parsed text here. Click Finish and the parsed
data is loaded to your sheet.

This can also be done from the Data/Import External Data/Import Data menu
option and has the added advantage that the parse definition can be embedded
in your worksheet. After you click Finish in the Wizard, a new dialog appears
asking you where you want to put the data. Select the desired destination in
your sheet and the parsed data will appear. As long as the format of your
..psv remains the same, then all you have to do to parse new data is right
click in this embedded table and choose Refresh Data.

This can work with just about any delimiter character.

Hope that helps.

JAS



"Robbie" wrote:

Exel 2000 on XP Professional
I have a server than produces pipe ( | ) separated text files. The files
all end in .psv (pipe separated vaules).
I would like to be able to click on one of these files and have Excel open
the file and parse it much the same way it does .csv files.
I have defined the file type, but I do not know of any way to pass values to
Excel telling it to open files of this type as pipe separated text files.
--
Rob White
Louisville, KY



All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com