View Single Post
  #3  
Old June 4th, 2010, 02:49 PM posted to microsoft.public.excel.worksheet.functions
Gary Brown[_6_]
external usenet poster
 
Posts: 61
Default Import old dos sequencial data

You would need a macro for this.
1st you have to change that file from sequential to 1 line per record.
Since you know the exact fixed length of each field, you know the exact
fixed length of each record.
Using the OPEN, WRITE and CLOSE statements, you can grab each record length,
throw in a carriage return [Chr(13)], form feed [Chr(12)] or line feed
[Chr(10)] at the end of each record, save the file and then pull it up in
Excel using Text to Columns - fixed length.

--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"Rich Stone" wrote:

I have an old database that stored it's data in a sequencial format with
fixed lengths for each field. As Windows 7 64-bit no longer allows the
running of the database I need to access the data in another way so wish to
import it to excel. I can get as far as marking the first record's field
lengths but there does not seem to be a way of marking the end of the record.
Instead it leaves the rest of the data in the final field!

Can anyone suggest the best way of doing this? Thank you.