Thanks, I should have noticed that i forgot to add a Readln to skip the first Record.

Quote Originally Posted by mablower View Post
Reading in one or more .csv files and converting to different csv file format for import in to a clients system.
Conversion is working accept that the file contains extra "Header" rows. One for each file that was read and stored in array from file(s).

Can the "Header" rows be suppressed?
_______________________________________________

// Open Output channel
Direct_Output channel 3 sFileName

// get size of array
Move (SizeOfArray(xeroInvoice)) to iSize

// loop through array
For iCount from 0 to (iSize-1)


Writeln channel 3 (xeroInvoice[iCount].InventoryItemCode +;
',' + xeroInvoice[iCount].Quantity +;
',' + xeroInvoice[iCount].UnitAmount +;
',' + xeroInvoice[iCount].LineAmount +;
',' + xeroInvoice[iCount].InvoiceDate)

Loop


// Close Output channel
Close_Output channel 3
_____________________________________________

//Output File Content
InventoryItemCode,Quantity,UnitAmount,LineAmount,I nvoiceDate
501,8.0000,39.9500,287.6400,9/21/2018
201,2.0000,39.9500,71.9100,9/21/2018
401,6.0000,39.9500,215.7300,9/21/2018
301,4.0000,39.9500,143.8200,9/21/2018
C101,1.0000,0.0000,0.0000,9/21/2018
InventoryItemCode,Quantity,UnitAmount,LineAmount,I nvoiceDate
H200,12.0000,22.4500,0.0000,9/20/2018
H201,6.0000,39.9500,0.0000,9/20/2018
H300,12.0000,22.4500,0.0000,9/20/2018
H301,6.0000,39.9500,0.0000,9/20/2018
H400,12.0000,22.4500,0.0000,9/20/2018
401,6.0000,39.9500,0.0000,9/20/2018
500,12.0000,22.4500,0.0000,9/20/2018
501,6.0000,39.9500,0.0000,9/20/2018


InventoryItemCode,Quantity,UnitAmount,LineAmount,I nvoiceDate
300,12.0000,22.4500,215.5200,9/21/2018
200,12.0000,22.4500,215.5200,9/21/2018
500,12.0000,22.4500,215.5200,9/21/2018
301,6.0000,39.9500,191.7600,9/21/2018
201,6.0000,39.9500,191.7600,9/21/2018
501,6.0000,39.9500,191.7600,9/21/2018
DC102,1.0000,0.0000,0.0000,9/21/2018
CR101,1.0000,0.0000,0.0000,9/21/2018
C101,1.0000,0.0000,0.0000,9/21/2018