Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Excel spreadsheet without header line?
Message
From
27/06/2001 11:25:32
 
 
To
27/06/2001 10:26:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00524116
Message ID:
00524191
Views:
24
Claude,
You could use automation to open the exported file and get rid of the header:
COPY TO < ExcelFile > TYPE XL5
oXls = CREATEOBJECT("excel.application")
oXls.Application.Workbooks.Open( < ExcelFile > )
oXls.ActiveSheet.Range("1:1").delete
oXls.visible=.t.
See also KB #746 that describes a similar approach to overcome the limitation of max. 16,383 records beeing copied with the native COPY TO TYPE XLS command. You could adjust this procedure to optionally remove the field names using the code above.

HTH
>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)
Daniel
Previous
Reply
Map
View

Click here to load this message in the networking platform