ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   HOW DO I CONVERT A .TXT FILE TO EXCEL (https://www.excelbanter.com/excel-discussion-misc-queries/203561-how-do-i-convert-txt-file-excel.html)

Todd

HOW DO I CONVERT A .TXT FILE TO EXCEL
 
I'm using Excel 2003. I have a basic text file (.txt) that I need to convert
to a spreadsheet in Excel. Visually the text file appears to be in columns.

Normally I would copy the text file to Word and then go through the steps to
replace the spaces with tabs, then converting text to table, then copy to
Excel. However, the text file I'm working with doesn't have a uniform number
of spaces separating each column (e.g. 1-8 spaces before tems). So unless I
want to go through the entire text file line by line and insert the tabs, I
can't figure out how to do it.

Is there an easy way to convert this file?

Dave Peterson

HOW DO I CONVERT A .TXT FILE TO EXCEL
 
If you open the text file in NotePad, does it look like it's in columns?

If yes, then drop the MSWord stuff and just use:
File|Open
to open the text file.

You'll be prompted with a text import wizard and you can choose that your data
is in a fixed width format.



Todd wrote:

I'm using Excel 2003. I have a basic text file (.txt) that I need to convert
to a spreadsheet in Excel. Visually the text file appears to be in columns.

Normally I would copy the text file to Word and then go through the steps to
replace the spaces with tabs, then converting text to table, then copy to
Excel. However, the text file I'm working with doesn't have a uniform number
of spaces separating each column (e.g. 1-8 spaces before tems). So unless I
want to go through the entire text file line by line and insert the tabs, I
can't figure out how to do it.

Is there an easy way to convert this file?


--

Dave Peterson

Gord Dibben

HOW DO I CONVERT A .TXT FILE TO EXCEL
 
Or if not fixed width...........use delimited byspace and in second step of
wizard checkmark "treat consecutive delimiters as one"

This will treat the 8 spaces as one space.


Gord Dibben MS Excel MVP

On Tue, 23 Sep 2008 11:11:32 -0500, Dave Peterson
wrote:

If you open the text file in NotePad, does it look like it's in columns?

If yes, then drop the MSWord stuff and just use:
File|Open
to open the text file.

You'll be prompted with a text import wizard and you can choose that your data
is in a fixed width format.



Todd wrote:

I'm using Excel 2003. I have a basic text file (.txt) that I need to convert
to a spreadsheet in Excel. Visually the text file appears to be in columns.

Normally I would copy the text file to Word and then go through the steps to
replace the spaces with tabs, then converting text to table, then copy to
Excel. However, the text file I'm working with doesn't have a uniform number
of spaces separating each column (e.g. 1-8 spaces before tems). So unless I
want to go through the entire text file line by line and insert the tabs, I
can't figure out how to do it.

Is there an easy way to convert this file?




All times are GMT +1. The time now is 05:12 PM.

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