How to Connect Excel to SQLite

Everyone knows Microsoft Excel, the king of spreadsheet applications with countless users around the world. Data management in Excel is easy, flexible, and intuitive. Now what if you had an option to directly use Excel for handling data in live databases, for instance, SQLite? Well, there is one.

You can easily connect Excel to SQLite via Devart Excel Add-in for SQLite, a simple yet powerful solution that will help you import SQLite data into Excel, edit it right there, and apply your updates in real time.

Configure a connection to SQLite from Excel

Before installing Devart Excel Add-in for SQLite, you need to make sure that your system meets the compatibility requirements. This may include having an appropriate version of Excel and valid permissions for installation.

1. The first thing you need to do is open Microsoft Excel and either start a new workbook or open an existing one.

2. Next, go to the menu at the top of the window. There you should see the Devart tab, which is added automatically once the Devart Add-in is successfully installed. If you don't see it, you might need to restart Excel or double-check whether the Add-in is enabled in File > Options > Add-ins.

3. Open the Devart tab and click Get Data.

Devart tab in Excel

4. Once the Import Data Wizard opens, enter your SQLite connection parameters. First, select SQLite database as the Data Source.

Selecting Data Source in Devart Excel Add-in for SQLite

5. Next, specify a path to the database file and its name. If you don't have a specified database file, you can selec the Create a database file if it doesn't exist checkbox, and the file will be created automatically.

6. Further parameters include Database Encoding and a few options that can be enabled by selecting the corresponding checkboxes:

  • Allow saving add-in-specific data in the Excel worksheet
  • Allow saving connection strings in the Excel worksheet
  • Allow reusing connections in Excel

7. Specify the Connection Name.

8. Finally, the Import Data Wizard allows you to include a number of advanced options in your connection string. To open the Advanced Connection Editor, click Advanced.

Advanced connection options in Devart Excel Add-in for SQLite

9. After you enter all the parameters, click Test Connection. If everything has been entered correctly, you will see a corresponding message.

Checking the connection in Devart Excel Add-in for SQLite

10. Click Next.

Import data from SQLite into Excel

Once you're connected to SQLite, you can start importing data into Excel.

1. In the Import Data Wizard, proceed to the Visual Query Builder tab and select the required database object(s) from the Object list. In our case, the object in question will be the actor table.

Selecting a table in Devart Excel Add-in for SQLite

2. Afterwards, click Finish to import data.

Load data using a SQL query

Alternatively, you can write a conventional SQL query to retrieve the required data with maximum precision. To do that, switch to the SQL Query tab in the Import Data Wizard and enter your query.

Editing the import query in Devart Excel Add-in

On the Preview Data page, you can double-check your data and specify the following import options:

  • Create a new worksheet for the imported data
  • Replace data on the existing worksheet with the imported data
Previewing data before import in Devart Excel Add-in

4. Click Finish to finalize your import.

Live edit SQLite data in Excel

With Devart Excel Add-in for SQLite, you can edit data directly in the worksheet. To do that, you need to start an update session by clicking Edit Mode. Now, you can operate with the entire imported table.

Edit mode in Devart Excel Add-in

  • Modify data

You can conveniently edit data in separate cells. Modified cells will be highlighted in olive.

  • Add new rows

By default, the empty row at the bottom of the table with empty cells will be highlighted in green. To add a new row, enter data into the cells of the said row and click Enter.

Alternatively, right-click the number of the row to insert a new row before the selected one. After that, click Insert and enter the required data. The new row will be highlighted in yellow.

  • Delete rows

To delete rows, select and right-click them, and then select Delete from the menu. The deleted row(s) will be highlighted in dark yellow.

Note: You can change all the highlighting colors in the Appearance section of Options.

Upload Excel data into SQLite

Let's proceed to upload the modified data back to SQLite. It's easily done with the Commit button.

Commit in Devart Excel Add-in

If you want to revert an unwanted commit, simply click Rollback.

Conclusion

Integration between Microsoft Excel and SQLite using the Devart Add-in is the optimal way to connect, import, edit, and load data most easily and conveniently. This way, you have more flexibility and full control over your data. You can get started right now by downloading Devart Excel Add-in for SQLite for a free trial. And if you need to operate with multiple data sources besides SQLite, you can download the complete Devart Excel Add-in Universal Pack.

Excel Add-in Universal Pack

Use the full power of Excel with your cloud or database data