Parse text file and extract and reformat data to CSV
- Status Closed
- Budget $30 - $250 AUD
- Total Bids 27
I need a simple script that will read files in the format of "[url removed, login to view]" attached.
From this file, the transactions need to be read, and the output reformatted to csv.
You will need to read through the [url removed, login to view] file until you get to "Statement Opening Balance" then read the amount after this. The transactions to be output follow this between lines of "......".
For each transaction you need to extract the date, and then the description, and then the transaction amount, and then the new balance. Using the transaction amount and the previous balance and the new balance you will need to determine if the amount is a debit (reduced the balance) or credit (increased the balance).
The transactions should be read until you reach "CLOSING BALANCE"
The output file will be in CSV, and in the following format:
Bank Account,Date, Description, Debit Amount, Credit Amount
The bank account will be the same for every line and will be able to be determined from the text at the start of [url removed, login to view] by reading the line under "BSB Account Number" and removing any "-" or " ".
The date will need to be changed from the [url removed, login to view] file being in "DD MMM" format, to DD/MM/YY when output to the csv. The year can be determined from the line that included "Statement Opening Balance".
The script should allow for the source file to be uploaded by the user and the output csv to be downloaded.Get free quotes for a project like this
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online