On Thu, 29 Apr 2010 16:52 -0700, "Fred Taylor" <[email protected]>
wrote:
> Not even worth trying if it's in Excel 2007 format. 

Well, not exactly. You can't do it via the import wizard but if you
install the Office 2007 Data Connectivity Components, available from
here:

http://www.microsoft.com/downloads/details.aspx?FamilyId=6F4EDEED-D83F-4C31-AE67-458AE365D420&displaylang=en

then you can do:

        lnSQLHandle = SqlStringConnect("Driver={Microsoft Excel Driver
        (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=myexcelfile.xlsx;HDR=No")

Assuming lnSQLHandle comes back non-zero then:

lcSelect=[SELECT * FROM "Sheet1$"]
lnResult = SQLEXEC(lnSQLHandle, lcSelect, "mycursor")

Assuming that works then you will have a cursor with the contents of
Sheet1 which you can have your wicked way with.
-- 
  Alan Bourke
  alanpbourke (at) fastmail (dot) fm


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://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