Question

  Asked: Apr 8 2008   3:13 PM GMT
  Asked by: Kioh46


Convert spreadsheet into a flat file


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?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



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.


--JP
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Microsoft Windows.

Looking for relevant Microsoft Windows Whitepapers? Visit the SearchWinIT.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Jlees  |   Apr 8 2008  4:04PM GMT

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?

 

Gilly400  |   Apr 17 2008  10:08AM GMT

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.

 

Kioh46  |   Apr 29 2008  1:17PM GMT

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