On 07/24/2013 08:44 AM, MB Software Solutions, LLC wrote:
On 7/24/2013 11:03 AM, Alan Bourke wrote:
On Wed, Jul 24, 2013, at 03:21 PM, Stephen Russell wrote:
Why not use ADO and query the excel file as a data object from now on?
This was as Office365 or any other new version comes out. You are
safe.
+1 for this - the Office Connectivity Components. Just work directly
with XLSX, much easier.
An older ProFox post with Alan's code:
--------------------------------
Subject: Re: Excel Data Import into VFP w/Multiple Pages
Date: Fri, 26 Apr 2013 16:52:15 +0100
From: Alan Bourke <[email protected]>
Reply-To: ProFox Email List <[email protected]>
To: [email protected]
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.
Don't really see any easier options to be honest.
--------------------------------
I agree. Nothing could be easier than having to modify a generic
routine in all of my applications that has been working for years and
update all of my customers when I have nothing better to do than develop
revenue generating software because Microsoft products are not
compatible with Microsoft products. ;^)
I DO appreciate the information guys! Where would I be without Profox?!?
By the way, did anyone see the Visual FoxPro Lifetime Achievement
Award? Because of all the help the Profox community has given me with
your accurate and amazingly quick answers to questions, I nominated Ed
Leafe for that award this year. Profox has been around for a long time
and has been up and available for almost all of that time. Ed has
provided this "home" for us without asking for anything in return. I
really mean it when I ask the question, "Where would I be without ProFox?"
I would like to thank him by nominating him for this award. Nominations
can be sent to [email protected].
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.