Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Only one instance of Excel?
Message
De
19/09/2004 07:13:03
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Only one instance of Excel?
Divers
Thread ID:
00943825
Message ID:
00943825
Vues:
75
A Toolbar with an Excel button:

* Init method
This.ADDPROPERTY('oXL',CREATEOBJECT("Excel.Application"))

* Click
lcFile = PUTFILE('Save the query as an Excel worksheet','','XL5')
IF NOT EMPTY(lcFile)
        SELECT (THIS.ExportFile)
	EXPORT TO (lcFile) TYPE XL5
	WITH This
		.oXL.Workbooks.OPEN((lcFile))
		IF .oXL.VISIBLE = .F.
		     .oXL.VISIBLE = .T.
		ENDIF 
	ENDWITH
ENDIF
This creates a new instance of Excel, where I'd really just want to add
file2,... aso. to the exisiting instance.
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform