SQLite to Excel
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:
- Windows 11, 64 bit
- Windows Defender as virus checker
- Office 2019, 32 bit. Even Microsoft recommends to use the 32-bit version of Office when running Window 64 bit. Sorry, the pictures are for a German version, and the menu entries are home-translated.
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. Downloadsqliteodbc.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.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
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.
Select ODBC DSN, then Next (Weiter in German)
- Select SQLite3 data source, then Next
- 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.