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>

See also

 Opening SQLite Databases

 Command Line Usage