
Loading Excel Files With DuckDB and the Excel Extension
Query an XLSX sheet with SQL in DuckDB through its excel extension, read every column as text, create a table and copy it to PostgreSQL or Parquet.
Everything you need to level up your coding skills.

Query an XLSX sheet with SQL in DuckDB through its excel extension, read every column as text, create a table and copy it to PostgreSQL or Parquet.

An Excel date column holds serial numbers, real dates or text. Classify each value in the stage, convert each kind by an explicit rule and reject the rest.

Find the real header row in an Excel sheet with a title, a date line or a logo above it, read from there with pandas, and cut notes and totals off the bottom.

Read every sheet of an Excel workbook with pandas, map each to its own staging table with safe names, skip hidden or unexpected sheets and verify the counts.

Query an Excel file straight from T-SQL with OPENROWSET and the ACE provider, enable ad hoc distributed queries safely, and load into a staging table.

Use the SQL Server Import and Export Wizard to load an Excel sheet, fix the ACE provider and 64-bit errors, and stop it from guessing column types wrongly.

SQLite cannot read XLSX itself. Load a sheet through pandas to_sql or a CSV import, avoid type affinity traps and convert Excel serial dates.

MySQL Workbench cannot import XLSX directly. Convert to CSV for the wizard or LOAD DATA, or use a Python script, and avoid the strict mode and date traps.

Load an Excel sheet into PostgreSQL with pandas and psycopg: read as text, copy into a staging table, then convert types in SQL and keep a batch record.

A complete method for loading Excel into PostgreSQL, MySQL, SQLite or SQL Server: read as text, stage, check counts, convert types and reload safely.
We send one email when a new article is published. No spam.