Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a header in a CSV file

Status
Not open for further replies.

marius1949

Programmer
Jan 7, 2016
5
0
0
ZA
In CW 6.3 I successfully write the data records to a csv file. I need to create a header and footer in the CSV file. Is there an example somewhere?
 
I have a legacy C6.1 app and allow the user to optionally create a CSV header using this code....
! Start of "Beginning of Procedure, After Opening Files"
! [Priority 3500]

!Create Header
CREATE(MH_Export)
OPEN(MH_Export)

CASE MESSAGE('Add a file header record?','Header?',icon:question,'&Yes|&No',1,0)
OF 1
MH_Exp:Record = |
'"Receipt_No",' & |
'"Date",' & |
'"Time",' & |
'"Member_No",' & |
'"Type",' & |
'"Name",' & |
'"Description",' & |
'"Cash_Cheque",' & |
'"Amount",'
ADD(MH_Export)
OF 2
!Skip header
END
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top