Конвертировать excel в sqlite

Input file

Our API accepts one or multiple Excel .XLSX files as input.

Max file size for web uploads: 50 GB
Register to upload big files via Amazon S3.

Output file

The API will return a ZIP archive that contains a .SQLITE database file.

Conversion methods

Using our Java tool

Download the

RebaseData client Java tool
.
To convert your database using RebaseData, run the following command:

                    java -jar client-0.0.5.jar convert --output-format=sqlite file.xlsx output-dir/
                

Using CURL

Replace file.xlsx with the path to the Excel file you want to convert.

The file output.zip will contain a .SQLITE file with your data or the error message if something went wrong.

curl -F files[]=@file.xlsx 'https://www.rebasedata.com/api/v1/convert?outputFormat=sqlite&errorResponse=zip' -o output.zip

How long does it take?

The conversion process takes between 15 seconds and multiple minutes. It depends on the size of the database.

You can also use your favourite tool

  • Read Excel using PHP
  • Read Excel using Python
  • Read Excel using Ubuntu

Why use RebaseData?

  • Strong security.
  • Convert online without installing Microsoft Excel.
  • Works with Windows, Mac and Linux.
  • Use an API to convert your databases.
  • Professional support.

Terms

  • We don’t guarantee for the success or correctness of the conversion
  • You are only allowed to convert your own database files
  • By using RebaseData, you agree to our general terms

Upload your Excel File and Convert

Drag & Drop files here…

Please note that your data will not be shared to anybody unless you do it yourself.

Conversion from Excel to SQLite

Upload your Excel data (widely used in software like MS Excel) and convert them by one click to SQLite (SpatiaLite) format (widely used in software like SQLite Database).

Notice to Excel format — Detection of columns containing coordinates is based on attribute name — please rename columns containing coordinates to any of these: x, xcoord, xcoordinate, coordx, coordinatex, longitude, long (and of course: y, ycoord, ycoordinate, coordy, coordinatey, latitude, lat). If you have geometry as WKT or WKB, use wkt or wkt name for the geometry column name.


About MyGeodata Converter

Our online converter of Microsoft Excel format to SQLite / Spatialite RDBMS format (Excel to SQLite) is fast and easy to use tool for both individual and batch conversions. Converter also supports more than 90 others vector and rasters GIS/CAD formats and more than 3 000 coordinate reference systems. If the coordinate system of your input data is not present or not recognized correctly, it is possible to assign the correct one. Then it is possible to transform your data to any other coordinate reference system.

Files can be uploaded using multiple selections or packed into any supported format (ZIP, RAR, 7Z, TAR, GZIP). If the input format is directory-based, it is necessary to pack whole directory — not only the content.

To avoid considerable servers loads we had to set conversions limits for each user — please see Free plan. If you exceeded the limit, you may register a prepaid plan — otherwise you will be charged by credit card during the conversion process (one-off payment). Your charges allow us to cover costs associated with the servers operation and to improve our service.

Supported coordinate reference systems

MyGeodata Converter supports more than 3 000 coordinate systems — including:

  • WGS 84
  • ETRS89 / LAEA Europe
  • ETRS89 / UTM zone 30N (N-E)
  • ETRS89 / UTM zone 29N
  • MGI / Austria Lambert
  • GDA94 / MGA zone 54
  • GDA94 / MGA zone 55
  • RGF93 / Lambert-93
  • WGS 84 / UTM zone …
  • ED50 / TM27
  • Amersfoort / RD New
  • Pulkovo 1942 / Gauss-Kruger
  • S-JTSK / Krovak
  • NAD27
  • NAD83

  • Pseudo-Mercator, Spherical Mercator, Google Maps, OpenStreetMap, Bing
  • OSGB 1936 / British National Grid — United Kingdom Ordnance Survey
  • … and 3 000+ other coordinate reference systems

We pride ourselves in building software that’s easy to use, but security is also our top priority.

We understand that some data uploaded might be sensitive, so we ensure that your data is only kept when needed.

We follow widely accepted industry standard practices when it comes to security:

  • HTTPS is enforced for all communications with our server
  • We enforce a strict access policy and employees or external collaborators
    never have access
    to user data
  • All data is always encrypted at rest
  • All data is automatically deleted forever
    24 hours after being uploaded.

We allow time before deleting files just in case you’re not done with the data, if you’re done with viewing or converting a file and want to delete it right away, you can do it yourself through the API.

Note that all files files uploaded without an account are acessible by a unique URL that is hidden but accesible by anyone, so we recommend you to sign up with an account if you want your files to be private, only your account will be able to access your files.

Excel-to-sqlite

Convert excel documents to sqlite!

Dependencies

  • Sqlite3: 5.0.0
  • Xlsx: 0.16.4

Documentation / usage

Navigation

  • Main
    • Loading your excel
    • Sheet names
    • Read One Sheet
      • Get sheet data
      • Save sheet to sqlite
    • Read All Sheets
      • Get data of all sheets
      • Save whole excel
    • _xlsx

Firstly, load the package.

const excelToSqlite = require("excel-to-sqlite");

The export of excel-to-sqlite is one function, with one parameter: excelPath.

Loading your excel

The path must me absolute, like __dirname. This example uses path.

const path = require("path");
let excelPath = path.join(__dirname, "test.xlsx"); // File "test.xlsx" in the current directory
let excel = excelToSqlite(excelPath);

Sheet names

After you used the excelToSqlite function, you can use the property sheets to get a string array of all the sheet names.

let sheets = excel.sheets;
console.log(sheets);

Read One Sheet

To read one sheet, use the method readSheet afer you used the excelToSqlite function. It has one parameter: The name of the sheet.

The name of the sheet is case-sensitive!

let sheet = excel.readSheet("Sheet1"); // Read "Sheet1".

Data

To get the data of the current sheet, use the property data on sheet.

To get the json data, use the method getJSON.

let json = sheet.getJSON();

Output

[
  Sheet1: [
    {column_1_name: "value", column_2_name: "value", ...},
    {column_1_name: "value", column_2_name: "value", ...}
  ]
]

Save sheet to SQLITE

To save the current sheet to sqlite, use the saveTo method. It has one parameter: The name of the sqlite file.

Warning: When saving to a database, a table with the same name as the current sheet will get deleted.

To change the name of the table in the sqlite database, set sheet._name to another string before calling the saveTo function.

This function returns a promise, that will be resolved with a database object of sqlite3.

// Save without changing the name
sheet.saveTo("database.sqlite").then((database) => {
  console.log(`Sheet ${sheet._name} saved in "database.sqlite"!`);
});

// Change the name for the table and then save
sheet._name = "lol";
sheet.saveTo("database.sqlite").then((database) => {
  console.log(`Sheet ${sheet._name} saved in "database.sqlite"!`);
});

Read All Sheets

To read all the sheets in an excel, use the readAll method.

let sheets = excel.readAll();

Data

To get all the data of all the sheets, use the property data. To convert your data to JSON, use the method getJSON.

let data = sheets.data;
let json = sheets.getJSON();

Output:
See Output

Saving Whole Excel

To save the whole excel in sqlite, use the saveTo method. It has one parameter, the name of the database.

This function returns a promise, that will be resolved with a database object of sqlite3.

Warning: When saving to a database, a table with the same name as a sheet will get deleted.

sheets.saveTo("database.sqlite").then((database) => {
  console.log("Whole database saved in sqlite!");
});

_xlsx

The property _xlsx is the output of xlsx.readFile.

The ESF Database Migration Toolkit is a robust and efficient solution for migrating data between various database formats, including MS Excel and SQLite.

This guide will show you how to easily migrate data from MS Excel to SQLite through a few simple steps of a wizard, streamlining complex migration processes and saving you valuable time.

Software Required:

DMToolkit_x64.zip
(60.9 MiB)
64-bit Windows application for ESF Database Migration Toolkit 11.1.24 (2023-04-14).
(md5: 20e0bca60d66442ae0435980e708e8c4)
DMToolkit_win32.zip
(57.4 MiB)
32-bit Windows application for ESF Database Migration Toolkit 11.1.24 (2023-04-14).
(md5: 680026ef8ecd5572eb4f0556d3f4abc2)

System Supported:

  • Windows 7 or higher.
  • MS Excel 97 or higher.
  • SQLite 2 or higher.

Introduction:

1. In «Choose a Data Source» dialog, Choose «Microsoft Excel(*.xls;*.xlsx)»;

  • Click on the «…» button.
  • Choose the Microsoft Excel (.xls or .xlsx) file that you want to use as the destination for the migrated data.
    Microsoft Excel

2. In «Choose a Destination» dialog, Choose «SQLite»;

  • Click «…» button to select the SQLite database file.
    SQLite

3.In «Select source Tables(s) & View(s)» dialog;

  • Select the tables or views you want to migrate.
    Select Tables&Views
  • You can access the table options or adjust the table structure by clicking the «…» button.
    Transform
  • In the «Field Mapping» option, you can customize the destination table’s fields, such as field name, data type, default value, comment, and more. You also have the option to choose the data transfer method, including Overwrite Table, Empty Data, Append Data, or Skip Table, or even filter the data before transferring it.

4. In «Execution» Dialog;

  • You can start the migration process by clicking «Submit». The toolkit will efficiently and seamlessly migrate your data from MS Excel to SQLite without the need for manual intervention.
    Execute
  • To keep track of the migration process, you can access the full migration log by clicking «Browse Log». This will provide you with a comprehensive view of the entire migration, including any potential issues and their resolutions.
  • To save time in the future, you can save the migration settings as a job file by clicking «Save as job». This allows you to quickly reload the migration job at a later time or run the migration job using the command-prompt by typing «dmtc.exe —help». The command-prompt provides you with a full list of parameters to customize the migration process to your specific needs.

5.Finished!

Upon completion, the toolkit will generate a comprehensive migration report, providing you with all the information you need to verify the accuracy and completeness of the migration process. So, you can sit back and relax while the program carries out the task efficiently. Should you have any inquiries or recommendations, don’t hesitate to reach out to us. We’re always happy to help.

Download Now »

Related Links:

Excel connection

We will choose Excel from the list of available database formats. Full Convert supports all versions of Excel documents from Excel 97 to Excel 2007. XLS and XLSX files are read flawlesly. Formulas will be calculated during the conversions, so target database will have formula results stored, not the formula expression texts.

Just type-in the folder containing your Excel documents, or click the ellipsis button on the right and Full Convert will display Browse for Folder dialog.

You don’t even need to have Excel installed to be able to convert your Excel documents. We directly read your Excel files.

We will choose SQLite from the list of available source database engines. SQL Azure is a cloud version of SQL Server.

You will need to use your server URL in the Server field, and the rest is standard (username, password, database name).

SQLite connection

All source tables are selected for conversion by default. In case you only need some tables, simply deselect the ones you don’t need — or deselect all, then select just the tables you do need.
Click the Copy your database button to get started.

Conversion is highly-optimized to run as fast as possible, yet provides top-notch reliability. Huge tables are converted in small chunks at a time, preserving memory and ensuring that your computer stays fast and responsive.

Data copying from source to target

Target database browser

Use our built-in database browser to examine the copied data.
Of course, you can also examine the conversion in detail and see in-depth information for each table.

Ready to dive in?

Run Full Convert today.

We offer unconditional 60 day money-back guarantee.

You will be helped directly by people who created this technology.

Similar migrations

  • Excel to Access

  • Excel to Adaptive Server Enterprise

  • Excel to Clipper

  • Excel to CockroachDB

  • Excel to CSV

  • Excel to DB2 LUW

  • Excel to dBase

  • Excel to Firebird

  • Excel to Greenplum

  • Excel to Gupta SQLBase

  • Excel to Ingres

  • Excel to Interbase

  • Excel to JSON

  • Excel to MariaDB

  • Excel to MySQL

  • Excel to NexusDB

  • Excel to ODBC

  • Excel to Oracle

  • Excel to Oracle RDB

  • Excel to Pervasive PSQL

  • Excel to PostgreSQL

  • Excel to Progress

  • Excel to SAP IQ

  • Excel to SAP SQL Anywhere

  • Excel to SIARD

  • Excel to SQL Azure

  • Excel to SQL Server

  • Excel to SQL Server CE

  • Excel to SQL Server Express

  • Excel to SQL Server Express LocalDB

  • Excel to SQLite

  • Excel to Teradata

  • Excel to Vertica

  • Excel to VistaDB

  • Excel to Visual FoxPro

  • Access to SQLite

  • Adaptive Server Enterprise to SQLite

  • Clipper to SQLite

  • CockroachDB to SQLite

  • CSV to SQLite

  • DB2 for i to SQLite

  • DB2 LUW to SQLite

  • DB2 z/OS to SQLite

  • dBase to SQLite

  • Excel to SQLite

  • FileMaker to SQLite

  • Firebird to SQLite

  • Greenplum to SQLite

  • Gupta SQLBase to SQLite

  • Ingres to SQLite

  • Interbase to SQLite

  • JSON to SQLite

  • MariaDB to SQLite

  • MySQL to SQLite

  • NexusDB to SQLite

  • NuoDB to SQLite

  • ODBC to SQLite

  • Oracle to SQLite

  • Oracle RDB to SQLite

  • Paradox to SQLite

  • Pervasive PSQL to SQLite

  • PostgreSQL to SQLite

  • Progress to SQLite

  • QuickBooks to SQLite

  • SAP Advantage to SQLite

  • SAP IQ to SQLite

  • SAP SQL Anywhere to SQLite

  • SIARD to SQLite

  • SQL Azure to SQLite

  • SQL Server to SQLite

  • SQL Server CE to SQLite

  • SQL Server Express to SQLite

  • SQL Server Express LocalDB to SQLite

  • Teradata to SQLite

  • Vertica to SQLite

  • VistaDB to SQLite

  • Visual FoxPro to SQLite

Try this fresh code exceltosql:

'''
This code uses the openpyxl package for playing around with excel using Python code
to convert complete excel workbook (all sheets) to an SQLite database
The code assumes that the first row of every sheet is the column name
Every sheet is stored in a separate table
The sheet name is assigned as the table name for every sheet
'''

import sqlite3
import openpyxl
from openpyxl import load_workbook
import re

def slugify(text, lower=1):
    if lower == 1:
        text = text.strip().lower()
    text = re.sub(r'[^w _-]+', '', text)
    text = re.sub(r'[- ]+', '_', text)
    return text

#Replace with a database name
con = sqlite3.connect('test.db')
#replace with the complete path to youe excel workbook
wb = load_workbook(filename=r'abc.xlsx')

sheets = wb.get_sheet_names()

for sheet in sheets:
    ws = wb[sheet] 

    columns= []
    query = 'CREATE TABLE ' + str(slugify(sheet)) + '(ID INTEGER PRIMARY KEY AUTOINCREMENT'
    for row in ws.rows[0]:
        query += ', ' + slugify(row.value) + ' TEXT'
        columns.append(slugify(row.value))
    query += ');'

    con.execute(query)

    tup = []
    for i, rows in enumerate(ws):
        tuprow = []
        if i == 0:
            continue
        for row in rows:
            tuprow.append(unicode(row.value).strip()) if unicode(row.value).strip() != 'None' else tuprow.append('')
        tup.append(tuple(tuprow))


    insQuery1 = 'INSERT INTO ' + str(slugify(sheet)) + '('
    insQuery2 = ''
    for col in columns:
        insQuery1 += col + ', '
        insQuery2 += '?, '
    insQuery1 = insQuery1[:-2] + ') VALUES('
    insQuery2 = insQuery2[:-2] + ')'
    insQuery = insQuery1 + insQuery2

    con.executemany(insQuery, tup)
    con.commit()

con.close()

Excel-to-sqlite

Convert excel documents to sqlite!

Dependencies

  • Sqlite3: 5.0.0
  • Xlsx: 0.16.4

Documentation / usage

Navigation

  • Main
    • Loading your excel
    • Sheet names
    • Read One Sheet
      • Get sheet data
      • Save sheet to sqlite
    • Read All Sheets
      • Get data of all sheets
      • Save whole excel
    • _xlsx

Firstly, load the package.

const excelToSqlite = require("excel-to-sqlite");

The export of excel-to-sqlite is one function, with one parameter: excelPath.

Loading your excel

The path must me absolute, like __dirname. This example uses path.

const path = require("path");
let excelPath = path.join(__dirname, "test.xlsx"); // File "test.xlsx" in the current directory
let excel = excelToSqlite(excelPath);

Sheet names

After you used the excelToSqlite function, you can use the property sheets to get a string array of all the sheet names.

let sheets = excel.sheets;
console.log(sheets);

Read One Sheet

To read one sheet, use the method readSheet afer you used the excelToSqlite function. It has one parameter: The name of the sheet.

The name of the sheet is case-sensitive!

let sheet = excel.readSheet("Sheet1"); // Read "Sheet1".

Data

To get the data of the current sheet, use the property data on sheet.

let data = sheet.data;

To get the json data, use the method getJSON.

let json = sheet.getJSON();

Output

[
  Sheet1: [
    {column_1_name: "value", column_2_name: "value", ...},
    {column_1_name: "value", column_2_name: "value", ...}
  ]
]

Save sheet to SQLITE

To save the current sheet to sqlite, use the saveTo method. It has one parameter: The name of the sqlite file.

Warning: When saving to a database, a table with the same name as the current sheet will get deleted.

To change the name of the table in the sqlite database, set sheet._name to another string before calling the saveTo function.

This function returns a promise, that will be resolved with a database object of sqlite3.

// Save without changing the name
sheet.saveTo("database.sqlite").then((database) => {
  console.log(`Sheet ${sheet._name} saved in "database.sqlite"!`);
});

// Change the name for the table and then save
sheet._name = "lol";
sheet.saveTo("database.sqlite").then((database) => {
  console.log(`Sheet ${sheet._name} saved in "database.sqlite"!`);
});

Read All Sheets

To read all the sheets in an excel, use the readAll method.

let sheets = excel.readAll();

Data

To get all the data of all the sheets, use the property data. To convert your data to JSON, use the method getJSON.

let data = sheets.data;
let json = sheets.getJSON();

Output:
See Output

Saving Whole Excel

To save the whole excel in sqlite, use the saveTo method. It has one parameter, the name of the database.

This function returns a promise, that will be resolved with a database object of sqlite3.

Warning: When saving to a database, a table with the same name as a sheet will get deleted.

sheets.saveTo("database.sqlite").then((database) => {
  console.log("Whole database saved in sqlite!");
});

_xlsx

The property _xlsx is the output of xlsx.readFile.

Like this post? Please share to your friends:
  • Конвертировать excel в php
  • Конвертировать excel в pdf в один файл
  • Конвертировать excel в google csv
  • Конвертировать excel в excel 2013
  • Конвертировать excel в excel 2010