Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Excel spreadsheet without header line?
Message
From
28/06/2001 10:14:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
28/06/2001 09:57:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00524116
Message ID:
00524681
Views:
21
Claude,
Use automation. This wouldn't work (wish it would). Excel has an header and extra info per cell. IOW there is no flat way for you to extract correct portion. If you decipher the format it might not work with future version say Excel XP.
Cetin

>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)
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform