Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy to Excel - XML format, any code to share?
Message
From
30/11/2010 04:24:48
 
 
To
30/11/2010 03:42:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01491027
Message ID:
01491042
Views:
68
>As of the current version 2010, Office is available in a 64-bit version. I wonder if 64-bit Office components can be invoked via COM from 32-bit VFP... and if anyone has experimented with this.
>

I have tried this http://www.foxite.com/archives/vista-excel-compatibility-w-worksheets-0000153776.htm and I could not get it to work with office 2010 64 bit

I suspect it's a 32/64 bit issue
	local filename
	filename = 'd:\tmp\1.xls'
	
	lFirstRowHasHeader = true

	lcConStr = ;
        'Provider=Microsoft.ACE.OLEDB.12.0;'+;
        'Data Source='+m.filename+';'+;
        'Extended Properties="Excel 12.0;HDR='+;
        IIF(m.lFirstRowHasHeader,'Yes','No')+'"'
	
	 

	Local oConn As 'ADODB.Connection'
	Local oRS As ADODB.RecordSet
	oConn = Createobject('ADODB.Connection')
	oConn.Mode= 1  && adModeRead
	oConn.Open( m.lcConStr )                           && Error here: Provider cannot be found. It may not be properly installed.
	oRS = oConn.Execute(m.tcQuery)
	RS2Cursor(oRS,m.tcCursorName)
	oRS.Close
	oConn.Close
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform