Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel 97 non-support continues...
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00205190
Message ID:
00205289
Views:
16
Hi Bruce,

>Hi Christof, Edward -- Okay, a little progress, Excel now stays open, but there is only a default empty sheet (actually 2).

This works for me:
local oRange

select print1          && a little test table
_VFP.DataToClip(,,3)
Thisform.oExcel = GetObject('','excel.sheet')
oRange = Thisform.oExcel.Application.Range("A1",Chr(65+FCount()-1)+Alltrim(Str(RecCount())))
oRange.PasteSpecial()
Thisform.oExcel.Application.Visible = .T.
How many fields does your table have? If these are more than 26, you have to change the Range() call. The Chr() function merely converts 1 to 26 to "A" to "Z".

Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform