excel-to-sql

Python SDK

Programmatic access to excel-to-sql

Installation

Install the package using pip to access the Python SDK.

pip install excel-to-sql

Quick Start

The Python SDK provides full programmatic access to all excel-to-sql features including import, export, querying, and quality profiling.

from excel_to_sql import ExcelToSqlite

# Initialize SDK
sdk = ExcelToSqlite()

# Import Excel file
result = sdk.import_excel("products.xlsx", "products")
print(f"Imported {result['rows_imported']} rows")

# Query data
df = sdk.query("SELECT * FROM products WHERE price > 100")
print(df.head())

# Export to Excel
sdk.export_to_excel("report.xlsx", {"Products": "products"})

# Profile quality
profile = sdk.profile_table("products")
print(f"Quality Score: {profile['summary']['quality_score']}")

Core Operations

Import

result = sdk.import_excel(
    file_path="data.xlsx",
    type_name="mytype",
    tags=["import", "verified"]
)

Export

# Export table
sdk.export_to_excel(
    output="report.xlsx",
    sheet_mapping={"Products": "products"}
)

Query

df = sdk.query("SELECT * FROM products WHERE category = ?", params=["Electronics"])

Profile

profile = sdk.profile_table("products")
print(f"Score: {profile['summary']['quality_score']}/100")

See Also

On this page