Converting an excel file to a flat file

dmurray

New Member
Joined
Jun 1, 2005
Messages
7
I've been trying to turn one of my excel spreadsheets into a flat file with no luck. Here are the steps I took:

1. I formatted the columns so they should all be right justified
2. I renamed the file as a prn (space delimited file)

When I bring up the new file in multi-edit, it cuts off after half the columns. The other half are wrapped underneath. Is there an easy way to turn an excel spreadsheet into a flat file?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I find that csv files work better than space delimited ones. Can you use csv for what you want?
 
Upvote 0
I can't use a csv file b/c I need the columns to be the same width everytime I convert an excel file to a flat file. It needs to be this way becasue I am importing data from the flat file to a database and the importer works off the column length.
 
Upvote 0
Perhaps you need to convert each column to fixed width text.

Try using formulas like:

=text(a1,"000000") to convert numbers to a six digit text figure before saving as the flat file.
 
Upvote 0
Ok - I may be misunderstanding what you are saying, but have you actually saved it as a space-delimited file, or are you just renaming? Because I dont think just renaming it will work. You need to go to File - Save As, and change the Save As Type to the appropriate type.

If I misunderstood, my apologies.
 
Upvote 0
The Formatted Text (Space delimited) (*.prn) format saves only the text and values as they are displayed in cells of the active worksheet.
All rows are saved. If a row of cells contains more than 240 characters, characters beyond 240 wrap to a new line at the end of the converted file.

Cheap trick:

Convert to CSV
Open in notepad
Cut and paste into word
Use find/replace to change all commas to spaces.
Cut and paste back into notepad.
Save.
 
Upvote 0

Forum statistics

Threads
1,222,797
Messages
6,168,297
Members
452,177
Latest member
mowas

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top