On 11/18/2014 3:06 PM, Jeff Johnson wrote:

On 11/18/2014 2:39 PM, Jeff Johnson wrote:

On 11/17/2014 10:26 AM, Tracy Pearson wrote:
Jeff Johnson wrote on 2014-11-17:
You need to use the right driver on 2010 vs the older one for earlier
versions.

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=
c:\myFolder\myExcel2007file.xlsx;
Extended Properties="Excel 12.0 Xml;HDR=YES";

Okay, the above works fine on my machine. The only thing is, it pops up and asks for a DNS. I select Excel and it works fine. I installed the update on my customer and it popped up asking for a DNS and I couldn't find one on their machine. Where would the above driver be installed on
the computer and why does the above command not work?  Do I need to
install something?

Jeff,

Is the customers machine a 64-bit OS?
Is your machine a 32-bit OS?

Tracy Pearson
PowerChurch Software


1 = lnsqlhandle = SQLSTRINGCONNECT("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)}; DBQ=" + lcspreadsheet + ";") 2 = lnsqlhandle = SQLSTRINGCONNECT([Provider=Microsoft.ACE.OLEDB.12.0;Data Source=] + lcspreadsheet + [;Extended Properties="Excel 12.0 Xml;HDR=NO";])

Latest Excel is 2007
1 and 2 both work on my 64 bit Windows 8 machine but 2 pops up and asks for a DSN which points to other spreadsheets but it works.
Only Excel is 2013
1 does not work on the customer 64 bit machine Windows 8 and returns a -1
2 asks for a DSN of which there is none, so it doesn't work

I read in my travels that you can use 1 with exporting xlxs to DBF and it works on mine.

Any ideas?


By the way, here is the excel.dns that makes the Ace driver work:
[ODBC]
DRIVER=Driver do Microsoft Excel(*.xls)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
ReadOnly=1
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=excel 8.0
DriverId=790
DefaultDir=O:\PINKERTON\SPREADSHEETS
DBQ=O:\PINKERTON\SPREADSHEETS\Medicare HICS.xls

The last two entries have nothing to do with the spreadsheets I am attempting to import.

This is a mature application that I delivered last week. One of the features is to be able to populate the database with historical information from Excel spreadsheets. The application works fine but they can't use it until the historical data is loaded. I have been trying (thanks to your help) everything for five days and I am no closer to a solution. I can't imagine what my customer is thinking but I can guess.

Thanks again to Microsoft for Office 2013!

I will take Tracy's advice and see what version of Office they are using.

Thanks,

--
Jeff

Jeff Johnson
[email protected]
SanDC, Inc.
(623) 582-0323
SMS (602) 717-5476
Fax 623-869-0675

www.san-dc.com
www.cremationtracker.com
www.agentrelationshipmanager.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