Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement