![]() |
| | #1 | |||||||
| Movable Type Integration Join Date: Feb 2007
Posts: 264
![]() | Fixed Width files to CSV using AnyData Quote:
__________________ You're friendly neighborhood automation routine. Last edited by MT Integration : 08-16-2007 at 02:51 AM. Reason: Update to original article | |||||||
| | |
| | #2 | ||
| Runs This Show | Just one note here - the code as it stands doesn't seem to parse the first line of the fixed width file into CSV. I'm not sure why - perhaps a flag needs to be added that says "no header rows" or something like that. My URL: http://www.stevekallestad.com | ||
| | |
| | #3 | ||
| Runs This Show | Yep. That was it. If there are no column names in the fixed width file, they must be specified. Simply change {pattern =>'A10 A5 A4'} to {pattern =>'A10 A5 A4',col_names=>'name,rank,serial'}, and it will work correctly. My URL: http://www.stevekallestad.com | ||
| | |