SQLite to Excel

database
SQLite
data
Excel
Author

Dieter Menne

Published

October 12, 2024

You can find many posts how to access an SQLite database from Excel. Often, the method uses VBA, or some older version of Excel, and I could not get things to work with my settings:

Things may be different for your installation, so don’t trust me blindly.

Steps

  • Download the ODBC driver from Christian Werner’s page. Select sqliteodbc_w64.exe when you have a 64-bit Office. Download sqliteodbc.exe for a 32-bit Office, even if your have a 64 bit version of Windows; this was the combination recommended by Microsoft some years ago. ODBC driver from Christan Werner

  • Install the driver by double-clicking the downloaded EXE file. In one of my older installations, the virus checker reported a Trojan.Gen8, so I tested the installation file on virustotal. From 55 virus checkers only Baidu and Norton reported a problem. Since Christian Werner has an impeccable reputation as an Open Source developer and the driver is often installed by others, I decided to mark the file as safe.

  • Start Excel. Select the Data tab.

  • Select Read external data (personal translations, might be slightly different in your language)

  • Select From other sources OLEDB input

  • Now comes the tricky part: I first tested the last item in the dropdown menu with keywords Microsoft Query and ODBC, but got a message in a later step that the database does not contain data. So use the second last item, keyword OLEDB, instead. OLEDB input

  • Select ODBC DSN, then Next (Weiter in German)

OLEDB input
  • Select SQLite3 data source, then Next

OLEDB input
  • Use Browse to navigate to your SQLite data file

You can now select the tables to be imported and the cell in your spreadsheet where to put the data. This all is standard Excel, so it is omitted here.