Exporting to a CSV file from multiple worksheets

N

Neale

I'm trying to set up an export to a CSV file that has the following
format:

File Header Record
Employee 1 Header Record
Transaction Record 1
Transaction Record 2
etc
Employee 1 Header Record
Transaction Record 1
Transaction Record 2
etc

The file layout example is:

MIFV02.00\EXAMPLE\DDMMYYYY\\\\D
EMP\\\\\
\TS\\\\\\
\TL\\\\\\\
\TN\\\\\\\\\\

I've already sorted out how to set up the worksheets so that I have a
separate file header and employee sheets
and can export the different ranges individually(!). (Because the
different transaction types need different numbers of fields, I've set
the sheets up with different sections for each of the transaction
types)

I'm not very good at understanding Looping though, and need some help
figuring out how to:

- write the header out
- go to the first employee sheet
-write the employee header out
-write the transactions out
-go to the next employee sheet, etc


I also don't understand how to put a delimiter before the first field
in a transaction line ,e.g., \TS\

I know it's a lot to ask, but I'm sure there are some geniuses out
there who think that this is a breeze!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top