Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Header lines Foxfire when outputting to a file
Message
 
 
À
13/12/2000 17:47:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00453134
Message ID:
00453357
Vues:
25
Nick,

I couldn't help but check out your message.. you know.. as a Potter. :^>

As far as Foxfire goes, I haven't got any experience. But, since .csv is a text file, perhaps you could use low level file functions to insert the text you wish to use as a header to the top of the file.

The following code worked for me on a .CSV file, but the first character of a field name on the following line appears to be missing. You may have to check the result and fiddle a bit with how the output looks so that it gives you what you want. Also, you can add more lines by adding CHR(13) to the cInsert value [for example: cInsert = CHR(13) + cInsert + CHR(13) ].

I hope it helps.

Steve

*************************************************************************************
* Build header line
cInsert = table1.cFieldvalue1 + table1.cFieldvalue2

* Open report file
nHandle = FOPEN(cFilename, 2)

* Make sure pointer is at top of file
nPosition = FSEEK(nHandle, 0)

* Insert line at top of file (carriage return & line feed are added w/ FPUTS)
nChars = FPUTS(nHandle, cInsert)

* Close report file
lClosed = FCLOSE(nHandle)
***********************************************************************************
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform