Open a DB File in Excel: Methods, Limits, and Options

How-to basics · Updated November 20, 2026

You usually cannot open a file ending in .db directly in Excel: the extension does not identify a single database format, and Excel has no universal .db reader. First identify the database; for SQLite, connect through a compatible ODBC driver or export the needed table to CSV and open that file in Excel.

Why a .db file may not open directly

A filename extension is a clue, not a guarantee of what is inside. The .db suffix is used by different applications for databases with different internal formats. SQLite is a common possibility, but a .db file might belong to an app, device, or database system that Excel cannot read. Renaming it to .xlsx or .csv does not convert the contents; it only changes the label.

Excel is a spreadsheet program, while a database can contain multiple tables, indexes, relationships, and other structures. A workbook sheet is a grid, so a database must be connected to or converted into a suitable grid before Excel can work with its records. The right method depends on the file’s actual format and what you want to do with its data.

Identify the database format first

Look for information from the program or device that created the file. Its documentation, export options, or support pages may specify whether the database is SQLite or another format. If the file came with an application, that application may provide a built-in export function. Do not assume that every file called data.db is a SQLite database.

You can also check the file’s properties and surrounding files for clues, such as an application name or database-related documentation. A SQLite viewer can often recognize a valid SQLite database, but use a reputable tool and a copy of the file. If a viewer reports that the file is not a database it recognizes, that does not prove the file is corrupt; it may simply use a different format.

Be cautious about uploading an unknown database to a free online converter. It may contain private records, credentials, or other sensitive information. Prefer software from the database’s publisher or a well-known, locally installed database tool.

Connect a SQLite database through ODBC

For Microsoft 365 Excel on Windows, one way to read SQLite data is through an SQLite ODBC driver. Excel does not include a general native SQLite connector, so the driver acts as a bridge. The driver must support your database and match Excel’s architecture: a 64-bit Excel installation normally needs a 64-bit driver, while 32-bit Excel needs a 32-bit driver.

  1. Make a working copy of the .db file and install a reputable SQLite ODBC driver that matches your Excel installation.
  2. If the driver requires a data source name (DSN), open the matching Windows ODBC Data Sources utility and create a DSN that points to the database copy. Some drivers offer a DSN-less connection instead.
  3. In Excel, choose Data > Get Data > From Other Sources > From ODBC. Select the DSN, or enter connection details if the driver supports that option.
  4. In the Navigator, choose the table or view you need. Select Transform Data to inspect and adjust the data in Power Query, or Load to put it into a worksheet.

The exact driver setup screens vary by supplier. A DSN can also be configured with a user or system scope; choose the one appropriate for your Windows account and permissions. If Excel cannot see the DSN, check that it was created in the ODBC utility matching Excel’s bitness and that the driver points to the correct file. Excel may ask for credentials or connection details depending on the driver.

Power Query imports a result set; it does not turn the workbook into a full SQLite database editor. If you change values in Excel, those edits do not automatically update the original database. Treat an imported result as a separate copy unless you have deliberately set up and verified a supported write-back process.

Export the database to CSV when you need a simple table

If you only need to inspect or analyze one or more tables, exporting them to CSV is often simpler than setting up ODBC. For a confirmed SQLite database, a desktop SQLite viewer such as DB Browser for SQLite can display tables and export selected data. In that program, look for File > Export > Table(s) as CSV file; wording or placement may differ between releases. Choose the required table and save the CSV locally.

Open the exported file in Excel, or use Data > Get Data > From Text/CSV to review the preview before loading it. The import preview is useful when the file contains dates, identifiers, or values with leading zeros. For example, a code such as 00427 may be interpreted as the number 427 if Excel treats it as numeric. Set that column to text when the zeros are meaningful. A CSV export normally contains values from a table, not the database’s relationships, indexes, or application rules.

CSV is a plain-text exchange format, not a replacement for the original database. It generally represents one flat table per file, and formatting or database-specific data types may not carry over. Keep the original .db file unchanged, and export each needed table separately if you need several of them.

What Excel can and cannot do with imported data

Excel is useful for sorting, filtering, charting, summarizing, and reviewing a manageable table. Power Query can also clean or reshape data during import. A database, however, may contain linked tables—for example, customers in one table and orders in another. Exporting only the orders table may leave customer IDs without the associated names. To make a useful report, you may need to export multiple tables and combine them using a database query or Power Query.

Excel worksheets have limits: a sheet can hold 1,048,576 rows and 16,384 columns. A database table larger than those limits cannot fit entirely on one sheet. Excel cells also have a maximum text length, so very long text fields may not transfer completely. For larger datasets or work that depends on relationships and database queries, use a database tool or analyze a filtered subset rather than trying to load everything into a worksheet.

Also check how imported values are interpreted. Dates may display differently because of regional settings, long numbers may display in scientific notation, and identifiers may lose leading zeros if treated as numbers. Inspect representative rows after loading, especially when accuracy matters. For a repeatable import, use Power Query steps to define the intended column types rather than manually correcting each refresh.

Common problems and how to resolve them

  • Excel says the format is unsupported: That is expected for many .db files. Identify the format, then use a compatible connector or export tool instead of changing the extension.
  • The ODBC source does not appear: Confirm that the driver and DSN match Excel’s 32-bit or 64-bit architecture. Reopen Excel after installing a driver if needed.
  • The connection fails: Verify that the file path is correct and that your account can access the file. Test with a local copy if the database is on a network or removable drive.
  • Text or values look different: Review the Power Query type assignments or the Text/CSV import preview. Set codes and identifiers to text when they should not be calculated as numbers.
  • Only some records appear: Check whether you selected a particular table, view, or filtered query. A database can have many tables, and one export is not necessarily the whole database.

Windows, Mac, and Excel for the web

The ODBC steps above are for Excel for Microsoft 365 on Windows. On Windows, driver installation and DSN configuration are handled through Windows ODBC tools, and the available connector depends on the installed driver. On Mac, ODBC driver availability, setup, and Power Query connectors differ; do not assume a Windows driver or DSN can be used there. If a compatible Mac connection is unavailable, export the database to CSV on a system that can read it, then open the CSV on the Mac.

Excel for the web does not provide the same access to local Windows ODBC sources. A practical route is to export the required table to CSV and open or upload that file in Excel. If the file is confidential, consider where it will be stored and who can access it before uploading it to cloud storage.

Safety and preserving the original

Work from a copy, particularly if the database belongs to an application. The application may rely on its database structure, and editing or replacing the file could damage its data or prevent the app from working. Use a database tool’s read-only option when available if your goal is inspection, and do not save an exported spreadsheet over the original .db file.

Take care with CSV files from untrusted sources. Spreadsheet programs can interpret certain text values as formulas, so review unexpected entries and import the file as text where appropriate. Use a trusted database viewer or driver, avoid enabling unexpected macros, and do not share a database or workbook containing personal or confidential records without checking its contents and permissions.

Frequently Asked Questions

Can I open a .db file directly in Excel?
Usually not. Excel does not support every format that uses the .db extension. Identify the database type, then connect through a compatible driver or export its data to a format such as CSV.

How can I tell if my .db file is SQLite?
Check the software that created it or its documentation. A reputable SQLite database viewer can also try to open a copy. The filename extension alone is not proof that the file is SQLite.

Will changing .db to .csv make it open in Excel?
No. Renaming a file does not convert its contents. Use the database application or a compatible viewer to export a table as CSV, then open the exported file.

Can Excel edit the original database?
An ordinary Excel import creates spreadsheet data; edits in the workbook do not automatically write back to the .db file. Use the database application for changes unless you have a specifically configured and verified write-back method.

Can Excel open a .dbf file?
.dbf is a distinct extension associated with dBASE-style files, not the same as a generic .db file. Support can depend on the Excel version and available import options. If Excel does not offer a suitable import, use a database tool to export the data to CSV.

What is the easiest option for a one-time import?
If you only need a table, export it to CSV with a tool that recognizes the database format, then inspect the CSV import preview in Excel. Use ODBC when you need a reusable connection or regularly refreshed data.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.