Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create Excel spreadsheet without header line?
Message
De
28/06/2001 09:57:03
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00524116
Message ID:
00524664
Vues:
16
Thanks for reply. Other repsonses suggested using OLE automation. This is an interesting alternative.

>You can use FileToStr() and StrToFile(). Copy to the XLS file as normal then copy the file to a string (FileToStr()). Then you can say 'string = SubStr(string, At(Chr(10), string)+1) to remove the first line. Then StrToFile() to overwrite your XLS file with the modified string.
>
>
>>VFP 5, Windows 98.
>>I use the COPY TO command to create an XLS (Excel Spreadsheet). It works fine. The problem is that user who eventually gets the file posts processes the spreadsheet. The problem is that VFP includes the field names as the first line of the spreadsheet (simplified example)
>>
>>acctno amount date description record 1
>>123456 62.78 5/31/2001 May records record 2
>> etc
>>
>>This causes the end user macro to get a fatal error from Excel.
>>
>>Question - Is there an easy way of eliminating the first line using VFP?
>>(or even a not so easy way)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform