Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Only one instance of Excel?
Message
From
19/09/2004 07:13:03
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Only one instance of Excel?
Miscellaneous
Thread ID:
00943825
Message ID:
00943825
Views:
76
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)
Next
Reply
Map
View

Click here to load this message in the networking platform