Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why doesn't this work.
Message
From
06/10/1999 18:26:13
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Why doesn't this work.
Miscellaneous
Thread ID:
00273443
Message ID:
00273443
Views:
55
PARAMETERS poForm, pcFileName

IF TYPE( "poForm.ole1.Name" ) # "U"
	poForm.ole1 = .NULL.
	poForm.RemoveObject( "ole1" )
ENDIF

poForm.AddObject( "ole1", "oleExcel" )

poForm.Ole1.DoVerb( -2 )

define class oleExcel as oleControl
	OleClass = "Excel.Sheet"
	documentFile = "C:\TEMP\1.XLS"
enddefine

I get a dialog box that asks for which Ole Control I want to add, and I also get an empty sheet if I choose and Excel WorkSheet with the name of "Object".
However if I do the following:
parameters pcFile
oForm = createobject( "Form")
oForm.AddObject( "ole1", "oleExcel" )

oForm.Ole1.DoVerb( -2 )

READ EVENTS

define class oleExcel as oleControl
	OleClass = "Excel.Sheet"
	documentFile = pcFile
enddefine
I suppose, if the following works I can always call a hidden form and just release it when I am done editing the worksheet.
Reply
Map
View

Click here to load this message in the networking platform