VB Script to Flatten a text file and output to CSV
4460
£75(approx. $94)
- Posted:
- Proposals: 0
- Remote
- #111660
- Archived
Description
Experience Level: Intermediate
Script needed to take a file and "flatten" it. This has to be a vb script. The file contains data relating to payments made to payees; it's in a format laid down by HMRC in which a unique key for the employee appears on a single line, followed by a varying number of lines of data on subsequent lines.
Each piece of data on the subsequent lines consists of a two-part set - a line with an identifier, followed by the monetary value. I need to wind up with a file in which there's a row for each payee, with columns of data for each of the data items 10 cols max.
The reason I need to do this is to make the file a sensible size for reconciliation purposes.
For (I hope) obvious reasons I can't provide the file - but I can provide an anonymised shortened test version of it. The main thing I need is the flow control logic to loop until a new payee is encountered (and probably someone who knows how to use arrays in vbs) - I can write a script to reformat the file but I don't have the skills to handle the extra logic. There is a small extra wrinkle in that I need a new line not just per payee but also based on a change in one other value that appears in the file.
Each piece of data on the subsequent lines consists of a two-part set - a line with an identifier, followed by the monetary value. I need to wind up with a file in which there's a row for each payee, with columns of data for each of the data items 10 cols max.
The reason I need to do this is to make the file a sensible size for reconciliation purposes.
For (I hope) obvious reasons I can't provide the file - but I can provide an anonymised shortened test version of it. The main thing I need is the flow control logic to loop until a new payee is encountered (and probably someone who knows how to use arrays in vbs) - I can write a script to reformat the file but I don't have the skills to handle the extra logic. There is a small extra wrinkle in that I need a new line not just per payee but also based on a change in one other value that appears in the file.
John E.
0% (0)Projects Completed
1
Freelancers worked with
1
Projects awarded
100%
Last project
10 Jan 2012
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies