Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote views and Excel
Message
 
 
To
19/04/2001 06:40:02
Christian Cote
Les Logiciels Onoma Inc.
Longueuil, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00497162
Message ID:
00500727
Views:
25
This message has been marked as the solution to the initial question of the thread.
>HI,
>I finally managed how to connect a remote view to an Excel spreadsheet. The only thing that is annoying me is the fact that the user need to select a workbook each time the view is opened. Is there a way to programmatically eliminate this step ? I wolud like to supply the user a specific workbook to be opened.
>
>Thank you for your help,
>Christian Cote

Maybe you can use SPT?
lcConnStr = "" + ;
	"DRIVER=Microsoft Excel Driver (*.xls); " + ;
	"UID=admin; " + ;
	"UserCommitSync=Yes; " + ;
	"Threads=3; " + ;
	"SafeTransactions=0; " + ;
	"ReadOnly=0; " + ;
	"PageTimeout=5; " + ;
	"MaxScanRows=8; " + ;
	"MaxBufferSize=2048; " + ;
	"FIL=excel 8.0; " + ;
	"DriverId=790; " 
	
lcDir = "H:\temp" 
lcExcelFile = "H:\temp\test01a.xls"

lnCon = SQLSTRINGCONNECT(lcConnStr + ;
			"DefaultDir=" + lcDir + "; " + ;
			"DBQ=" + lcExcelFile + ";")

* GetName of the table
lnRet = SQLTABLES(lnCon)
lcTable = Alltrim(table_name)

SQLEXEC(lnCon, [SELECT * FROM "] + lcTable + [" ExcelTable], "Mycursor")
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform