Here you can find the detailed instruction on how to convert data from SQLite database to Microsoft Excel. Exporting data from other database types like Firebird, SQL Server, Oracle, etc is very similar; the difference is in registering the database in Exportizer.

Below, it is shown how to export data directly (from GUI or command line), or using clipboard.

Note: Exportizer also provides the ability to export data to intermediate file formats. For example, you can export SQLite (Firebird, PostgreSQL etc) data to CSV format, and then open the destination .csv file in Excel: it is faster, but has some inconveniences comparing with direct exporting to Excel (e.g. when exporting multiple tables to different sheets of one Excel workbook). Exporting to intermediate file formats is not covered in this topic.

Export Conditions

In most cases, to export from SQLite to Microsoft Excel, the following conditions are required:

Configuring SQLite to Excel Exporting

  1. Launch Exportizer Enterprise.
  2. Register your source SQLite database using FD interface. It must be a pointer to an SQLite file. In most cases, specifying the file name is enough. Sometimes, specifying the Vendor library parameter may be needed: this must a main DLL from the folder where SQLite installed, e.g. sqlite3.dll.

Export Steps

  1. Open the registered SQLite database.
  2. Chose a table or tables to export or write and execute your SQL query.
  3. Click Export button.
  4. Choose the target Excel format. You have several formats available: Excel (XLSX), Excel (XML), Excel (XLS), Excel (OLE). Please note that exporting to Excel (XLS) is the fastest, and exporting to Excel (OLE) is the slowest; Excel (XLSX) format is the most configurable, and allows multiple tables to be written to one file, one table per Excel sheet. You may also want to read more about the output formats.
  5. Specify a target file (for multi-table exporting, you can specify a folder, where the target files will be created).
  6. Click Next. For multi-table exporting, specify the source-to-target table and file mappings, otherwise check the source-to-target field mappings.
  7. Click Export.

Exporting SQLite to Excel using Command Line

Here are some examples of exporting data from SQLite to XSLX.

Exporting a table from SQLite file:

"C:\Program Files (x86)\Vitaliy Levchenko\Exportizer Enterprise 8\exptizer.exe" /export /ExportType=EXCELXLSX /ExportMode=REPLACE+INSERT /RowsPerSheet=800000 /IncludeColNames /IncludeImages /IncludeMemo /SrcDBInterface=fd /SrcDBKind=FILE /SrcDBDriver=SQLITE /SrcDB=C:\MyData\org.db /SrcTableName=employee /TrgDB=C:\TEST\employee.xlsx

Exporting all tables from SQLite file (one table per Excel file):

"C:\Program Files (x86)\Vitaliy Levchenko\Exportizer Enterprise 8\exptizer.exe" /export /ExportType=EXCELXLSX /ExportMode=REPLACE+INSERT /RowsPerSheet=800000 /IncludeColNames /IncludeImages /IncludeMemo /SrcDBInterface=fd /SrcDBKind=FILE /SrcDBDriver=SQLITE /SrcDB=C:\MyData\org.db /SrcTableName=* /TrgDB=C:\TEST\*.xlsx

Exporting several tables from SQLite file to one target XLSX file (one table per Excel sheet):

"C:\Program Files (x86)\Vitaliy Levchenko\Exportizer Enterprise 8\exptizer.exe" /export /ExportType=EXCELXLSX /ExportMode=REPLACE+INSERT /TableMappingsFile=C:\TEST\Sqlite2ExcelTableMappings.xml /RowsPerSheet=800000 /IncludeColNames /IncludeImages /IncludeMemo /SrcDBInterface=fd /SrcDBKind=FILE /SrcDBDriver=SQLITE /SrcDB=C:\MyData\org.db /TrgDB=C:\TEST\

In the last case, please pay attention to how the source-to-target table mappings are defined. We use /TableMappingsFile parameter which points to an XML file with the mappings definition. For exporting three tables, the file content may look like this:

<?xml version="1.0" encoding="UTF-8"?>
<TableMappings>
  <Items>
    <TableMapping>
      <Source>
        <TableName>employee</TableName>
      </Source>
      <Target>
        <TableName>employee.xlsx</TableName>
        <FileName>org.xlsx</FileName>
        <TableTitle>employee</TableTitle>
        <SheetName>employee</SheetName>
      </Target>
    </TableMapping>
    <TableMapping>
      <Source>
        <TableName>goods</TableName>
      </Source>
      <Target>
        <TableName>goods.xlsx</TableName>
        <FileName>org.xlsx</FileName>
        <TableTitle>goods</TableTitle>
        <SheetName>goods</SheetName>
      </Target>
    </TableMapping>
    <TableMapping>
      <Source>
        <TableName>salary</TableName>
      </Source>
      <Target>
        <TableName>salary.xlsx</TableName>
        <FileName>org.xlsx</FileName>
        <TableTitle>salary</TableTitle>
        <SheetName>salary</SheetName>
      </Target>
    </TableMapping>
  </Items>
</TableMappings>

Exporting Data Using Clipboard

  1. Launch Exportizer Enterprise.
  2. Register your SQLite database.
  3. Open your registered SQLite database.
  4. Open the source table or write and execute your SQL query.
  5. Copy the needed data. You can do this in two ways:
    • Quick, but limited. Select a range of cells in a visible part of the data grid, then click Ctrl+C.
    • Flexible. Click Copy Data button. Choose Text/CSV format, Standard schema, Tab field separator, and specify other options if needed. Then click Copy.
  6. Launch Microsoft Excel and paste the copied data to its sheet.

See also

 Opening SQLite Databases

 Command Line Usage