I’m trying to extract data from a data file that’s tab-delimited (in some parts), and really seems like it’s going to be a headache to work out (I reallw wish they could just have CSV-ed it).
Here’s the data:
http://www.fededirectory.frb.org/FedACHdir.txt
Here’s the format description:
http://www.fededirectory.frb.org/format_ACH.cfm
I’d like to extract this data and store it in a database with serverside javascript, (ASP). Any ideas?
Your file is not
tab delimited… it isposition delimited.To handle the file using
javascript, the file must be on the same server and available viaHTTP.If you need to upload the file to some server, the server side language need to extract all the data based on your layout file
In order to extract it… you must for example do something like:
And
iteratethat code for every line in your file.In pseudo-code :
Note: Process that file with
JavaScriptwill be painful I recommend to do it in the server side of your application.