On 08/08/2013 07:12 AM, Ted Roche wrote:
A client is reporting problems with Excel Automation on Windows 8.
Gathering more details at this point (like, versions? etc.) but they're a
remote client and hard to get hold of.

Anyone have a quick answer for why a VFP 9 app, running for decades, would
not start up Excel on a Windows 8 machine? Is it 64-bitness vs. 32-bit? New
version of Automation incompatible with VFP? Other guesses welcomed.

"The way I tend to do this these days is the Office Data Connectivity
Components (free Microsoft component). Handles all types of Excel files
via OLE DB:

        This.SQLHandle = SqlStringConnect("Driver={Microsoft
        Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};" ;
                            +"DBQ=" +
                            FullPath(lcFile)+";")

... where lcFile is your Excel workbook. then:

            lcSelect=[SELECT
            Date,Account,Name,Ref1,Value,Lodgement FROM
            "Sheet1$"]
            lnResult = SQLEXEC(This.SQLHandle, lcSelect,
            "_stage1_")

That gets you a cursor called '_stage1_' with the contents of Sheet 1 in
the workbook. "

Ted: You may have read this the other day. I've had an import from Excel working for years and Windows 8 just locked up. I was using automation.

Alan Bourke posted the above code and I modified my routines to use it and it works great.

HTH

Jeff

---------------

Jeff Johnson
[email protected]
(623) 582-0323

www.san-dc.com
www.arelationshipmanager.com



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to