Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Excel file to space delimited text file?

Sep 25, 2007 1:23PM PDT

I know how to import a text file as space delimited into an excel file but I want to do the opposite. Does anybody know how to change an excel file into a space delimited text file? I have an excel file consisting of about 15,000 rows with data in the first column only. I need to convert that to a text file with a space between the data from each cell. Any help would be appreciated!
Thanks,
Kelly

Discussion is locked

- Collapse -
Easy., in principle.
Sep 25, 2007 4:59PM PDT

1. Save as csv.
2. Open it in Word
3. Edit>Replace paragraph mark with space
4. Save as text file.

Works with me with 15000 rows containing a "A" in column A, although Word doesn't really like a line of 30.000 characters (15.000 A and 15.000 spaces).

Hope this helps.


Kees

- Collapse -
great in theory
Oct 2, 2007 1:53PM PDT

but it only seems to work for me if I have multiple columns. A comma is inserted between each column field with a <CR> at the end of each row. I can cut and paste the A column into multiple columns or copy & transpose to rows, but that is very time consuming, and the number of columns is much more limited than the number of rows. I'll keep searching for a solution.
Thanks for the input!
Kelly

- Collapse -
Re: csv-files
Oct 3, 2007 1:19AM PDT

There's no reason why saving as .csv-file shouldn't work in a one-column spreadsheet. It did with me anyway.

The result of a 2 column spreadsheet, indeed, is a1,b1<cr>a2,b2<cr>a3,b3<cr>
The result of a 1 column spreadsheet is a1<cr>a2<cr>a3<cr>.
Then cr is translated into a paragraph mark if you open the file in Word.
Changing paragraph marks into space leads to a1 a2 a3 and that's what you asked for.

I tried it before I wrote it down.

Kees

- Collapse -
My mistake..
Oct 3, 2007 12:27PM PDT

It works as you stated! Thanks guys.

- Collapse -
Extend the theory.
Oct 3, 2007 2:01AM PDT

You can replace the <CR> in Word as well to join the rows...

- Collapse -
Save Excel File to space delimited text file
Apr 23, 2009 6:04AM PDT

There's an easier way than saving as a CSV file:

Select File/Save As
In the Save As Type drop down box select Formatted Text (space delimited)(*.prn)