Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODBC Driver for Excel on macOS #40

Open
2 tasks done
adamkk opened this issue Nov 13, 2024 · 0 comments
Open
2 tasks done

ODBC Driver for Excel on macOS #40

adamkk opened this issue Nov 13, 2024 · 0 comments

Comments

@adamkk
Copy link

adamkk commented Nov 13, 2024

What happens?

After installing duckdb on macOS with Sonoma I struggle to connect duckdb to MS Excel - the latest Version 16.91 (24111020). Please help and issue a blog article for dummies - how to make MS Excel see duckdb on a Mac (also on Win10/Win11). Many accountants would like to match a fast duckdb with a user friendly Excel on the client side.

Problem - Excel cannot connect to a duckDB ODBC Driver. Thus I cannot use my preferred configuration: duckdb as the main database and Excel as a client.

Actions completed:

  1. brew install duckdb

  2. isql -v DuckDB shows live duckDB
    myname@user ~ % isql -v DuckDB
    +---------------------------------------+
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | echo [string] |
    | quit |
    | |
    +---------------------------------------+
    SQL> PRAGMA database_list;
    ------------------------------------------------------+
    | 1148 | memory |

  3. The ODBC drivers are in:
    myname@user ~ % odbcinst -q -j
    unixODBC 2.3.12
    DRIVERS............: /opt/homebrew/etc/odbcinst.ini
    SYSTEM DATA SOURCES: /opt/homebrew/etc/odbc.ini
    FILE DATA SOURCES..: /opt/homebrew/etc/ODBCDataSources
    USER DATA SOURCES..: /Users/myname/.odbc.ini

  4. odbc.ini is:
    [ODBC]
    Trace=yes
    TraceFile=/tmp/odbctrace

[DuckDB Driver]
Driver=/Users/myname/duckdb_odbc/libduckdb_odbc.dylib

[DuckDB]
Description = ODBC for DuckDB
Driver = /opt/homebrew/lib/duckdb_odbc.so

[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/homebrew/lib/libmsodbcsql.17.dylib
UsageCount=1

  1. odbc.ini
    [DuckDB]
    Description = DuckDB ODBC
    Driver = DuckDB
    Database = /Users/myname/quack.db
    allow_unsigned_extensions = true
    User = # Leave User blank
    Password = # Leave Password blank

  2. A file .odbc in catalogue /Users/myname/.odbc.ini
    [DuckDB]
    Driver = DuckDB Driver
    Database = /Users/myname/quack.db
    allow_unsigned_extensions = true

[ODBC Data Sources]
DuckODBC = DuckODBC

[ODBC]
Trace = 0
TraceAutoStop = 0
TraceFile = /var/root/sql.log
TraceDLL =

[DuckODBC]
Driver = /opt/homebrew/etc/odbc.ini

  1. When checking on the Excel side the OBC files there are 3 options:

A. USER DSN - while adding DuckODBC I see error IM003 [iODBC][Driver Manager]Specified driver could not be loaded
B. SYSTEM DSN - while adding DuckODBC I see error Request failed

Appreciate a fix or a .pkg file to make the instalment & configuration process quick for the end users.

To Reproduce

brew install duckdb
odbcinst -q -j

OS:

macOS Sonoma

DuckDB Version:

duckdb 1.1.3

DuckDB Client:

Excel

Hardware:

MacBook Air M2

Full Name:

Adam Kaliszewski

Affiliation:

BCT

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have not tested with any build

Did you include all relevant data sets for reproducing the issue?

No - Other reason (please specify in the issue body)

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have
@szarnyasg szarnyasg transferred this issue from duckdb/duckdb Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant