Convert spreadsheet into a flat file

50 pts.
Microsoft Excel
Microsoft Excel 2003
I need to convert a spreadsheet into a flatfile using the mid function. I only want to use a couple fields out of the spreadsheet, can someone help me?

Answer Wiki

Thanks. We'll let you know when a new response is added.

What do you mean “flatfile”, strictly speaking, an Excel spreadsheet is a type of flatfile. You need to provide much more information if you want help.


A “Flat-File” is a file in which data is formatted in plain-text, usually with some kind of delimiter (tab, comma, etc.). 
If you don’t know what half the question is talking about why bother to respond? I was really looking for a helpful answer because I know what a “flat-file” is and I had the same question…the top answer here is disappointing to say the least…jeez

Discuss This Question: 5  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Jerry Lees
    Can you give an examply of the input rows and what you want the output to look like? You specified the Mid function, so I assume you only need a protion of a cell-- Is that correct?
    5,335 pointsBadges:
  • Gilly400
    Hi, Normally I use the "Save as" and then select .PRN, this should give you a flat file with no formatting. Alternatively I use .CSV comma separated variable files. Regards, Martin Gilbert.
    23,730 pointsBadges:
  • Kioh46
    I am sorry I took so long to reply. I figured it out. I need to give each field a set length no matter what the length of the data is the field was, so i used the mid function to do so, concatenated with another field, repeating the process until I included all of my fields and then copied the and paste the values into text file. example(=MID(B:B&" ",1,9)MID(B:B&" ",1,9)&" "&TEXT(D:D,"MMDDYY")&" "&)MID(E:E&" ",1,20)&" "&MID(F:F&" ",1,5)&" "&..............) Result(flat file), xxxxxxxx xxxxxxxx xxxxxx xxxxxxxxx, xxxxx xxx xxxxxxxxxxxxx ,xx xx xxxx xxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxx xxxxxxxxx xxx xxxxxxx xx xxxx xxxxxxxxxxx
    50 pointsBadges:
  • Subhendu Sen
    Did you mean delimited flat file? If yes, you can make another copy of the same file with your choice of fields/columns. Now from File menu, select save as and select .CSV as file extension. Also macro can help in this regard.
    142,210 pointsBadges:
  • ToddN2000
    I would go with a CSV file format to handle this. When you save it in this format you can open the file in a text editor. It will appear as a flat file with a comma delimiter separating the fields. All you need to do is when reading the flat file, look for the comma to separate the fields.
    136,250 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: