Creating a space deliminated file from Exel worksheet

I need to create a space deliminated file from a excel worksheet.  I already know what the character  fixed lengths must be for trhe file, and have in my spreadsheet data for all those fields.  The programs I have are MS Excel, MS Access and MS Fox Pro.
steveLaMiAsked:
Who is Participating?
 
rockiroadsConnect With a Mentor Commented:
long winded method

use MS Access, create a link to that excel spreadsheet (File/Get External Data/Link)

then u can export from Access, and use that linked excel spreadsheet as a table
right click on that linked table, select export, select type (.txt, .csv etc)
it should bring up some dialogs, select delimited, click on Advanced and set your options

0
 
csachdevaCommented:
follow this link:

http://support.microsoft.com/?kbid=291064

Chetan Sachdeva
0
 
thomaswrightCommented:
I would use the VBA code to do this.  Simlpy create a nested loop to write to a file using open, print #, close. At each print cycle, add a space " " or chr equivelent.

open myfile.txt for output as #1
sheets("sheet1").activate
For r = 1 to (number of rows)
      For c = 1 to (number of columns)
            print #1, cells(r,c).value & " " 
      next c
next r
close #1
msgbox "Done! Thank you Thom Wright!"

This may not produce the exact ouput you want, but you get the idea. I would go one step further and add everything to a subscripted array first then print the output of the array strung togher in a string variable.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.