Export CSV; first three rows contain record map
Hello All
I have a situation where I have a worksheet with rows of data to
export to a CSV file using VBA. Simple enough. Now for the kicker.
The first three rows are record maps ending with a "+" and I need to
parse them to Row1 = 10 records, Row2 = 5 records and Row3 = 10
records while the data in the remaining rows will contain 50 records.
i.e. csv output now:
Name,Date,,,,,,,,,+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,
GL,,,,,+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,
Location,State,,,,,,,,,+,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,
data,data,data,data,data,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,
data,data,data,data,data,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,
data,data,data,data,data,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,
desired csv output:
Name,Date,,,,,,,,,+
GL,,,,,+
Location,State,,,,,,,,,+
data,data,data,data,data,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,
data,data,data,data,data,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,
data,data,data,data,data,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,
I am trying to avoid manual edit of csv file after export; dealing
with a repetitive process with multiple files.
Any suggestions?
Thanks in advance
DW
|