Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Excel spreadsheet without header line?
Message
 
To
27/06/2001 10:26:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00524116
Message ID:
00524140
Views:
17
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)
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform