none
Error received using Microsoft Excel ODBC Driver RRS feed

  • Question

  • I am attempting to output the results of an interactive query against a Sybase database to an Excel spreadsheet using the Sybase SQL OUTPUT statement.  The OUTPUT statement specifies a Microsoft Excel ODBC driver, in the format 'Driver=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)'.  When I execute the OUTPUT statement, I get the following error "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". When I look at my ODBC data sources, I have one named "Excel Files" with the associated driver "Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)".  It is located under the "User DSN" tab.

    I have Office 2010 on my PC, which I assume is the source of the Excel Files DSN.  Also, my OS is Windows 7.


    • Edited by Tim Peters Thursday, September 4, 2014 2:18 PM
    Thursday, September 4, 2014 2:17 PM

Answers

  • I guess I found the answer.  The Sybase Interactive SQL executable I was using was the 64-bit version; apparently, the Microsoft Excel Driver is 32 bit, and the 2 don't play well together.  I installed 32-bit version of Sybase SQL Anywhere to get the 32 bit Interactive SQL, and the OUTPUT statement now runs without throwing an error.

    On a side note, where can I find more information on the Microsoft Excel Driver - it seems that the format of my output file when using said driver is Excel Binary Workbook (file extension *.xlsb); I'd prefer it be *.xlsx or *.xls.

    • Marked as answer by Tim Peters Thursday, September 4, 2014 4:49 PM
    Thursday, September 4, 2014 3:44 PM