Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why doesn't this work.
Message
De
06/10/1999 18:26:13
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Why doesn't this work.
Divers
Thread ID:
00273443
Message ID:
00273443
Vues:
54
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.
Répondre
Fil
Voir

Click here to load this message in the networking platform