Skip to content

Instantly share code, notes, and snippets.

@antiproblemist
antiproblemist / excel2sql.py
Created March 14, 2016 11:54
Convert complete excel workbook to SQLite database (All Sheets)
'''
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