we have a donations records system that will accept uploads of bank statements, but only…
- User
we have a donations records system that will accept uploads of bank statements, but only in a certain format. i was thinking of creating a program that would automatically parse out the statement in the required format. these bank statements are typically in csv format. is there a programming language that could create a program that doesnt require any downloads for the user. meaning they could just run the program, it would ingest the csv file and then spit out a revised csv file in the updated format. here is the input format of one of the files, these are the headers in the first row of the input CSV: Posted, Value Date, Description, Debit, Credit. The challenge is in the description section where the format is: "Telephone/Online banking , INTERAC ETRNSFR AD RECVD NAME". There is a challenge with NAME in that sometimes it is FIRSTNAME LASTNAME, or FIRSTNAME MIDDLEINITIAL LASTNAME, FIRSTNAME MIDDLENAME LASTNAME, some names are hyphenated, and then there are others that don't follow any of the preceding formats, but those are the most common formats, any other format should be treated as an exception and prompt the user of the program manually. The output CSV is in the format: First Name,Last Name,, Date ,Fund, Fund Number, Amount,Method, Source, Check Number, CC Last Four, Notes, Batch Number, ID. The NAME from the input file should be parsed into the output CSVs First Name and Last name columns, the Fund should be Prompted and should be one of General, Youth, Benevolent, Stewardship, or Ministry, the source should prompt the user for ACH, Cash, Cheque or EFT. let me know if you need anything else from me
Yes, you can create a program that processes the bank statements as you described without requiring users to download or install any additional software. The best approach is to develop a web application that runs entirely in the user's web browser using JavaScript, HTML, and CSS. Here's how you can proceed:
Language and Platform: Use JavaScript for the programming language because all modern web browsers support it natively. This means users won't need to install any new software or plugins—they'll just need a web browser, which they already have. User Interface: Create an HTML page that allows users to: Upload the CSV file containing the bank statements. Select options for fields like Fund and Source through dropdown menus or prompts. Display any exceptions or prompts for manual input when the name formats don't match expected patterns. CSV Processing: Use JavaScript to read and parse the uploaded CSV file. The FileReader API can read the contents of the CSV file on the client side. Parse the CSV data into a workable format (e.g., an array of objects). For the Description field, use regular expressions or string manipulation to extract the First Name and Last Name. Handle different name formats by writing parsing logic that accounts for middle initials, middle names, and hyphenated names. Implement a way to handle exceptions when the name doesn't fit the expected patterns. You can pause processing and prompt the user to manually input or correct the name. User Prompts: For fields like Fund and Source, provide dropdowns or radio buttons with the predefined options (General, Youth, etc., and ACH, Cash, etc.). If your application encounters a name that doesn't fit the expected format, display a prompt or form field where the user can enter or correct the name manually. Generating the Output CSV: After processing, use JavaScript to generate the new CSV file in the required output format. You can create a downloadable link that allows users to download the processed CSV file. The Blob object and URL.createObjectURL can be used to facilitate file downloading in the browser. Ensuring Privacy and Security: Since all processing is done client-side in the user's browser, the data doesn't get transmitted over the internet to any server, which helps maintain data privacy and security. Make sure to communicate to users that their data is processed locally and isn't being uploaded anywhere. Enhancements: Implement error handling to catch and inform users of any issues during file processing. Provide instructions or tooltips to guide users on how to use the application. Style the application using CSS to make it user-friendly. Benefits of This Approach:
- Assistant