Import data from Excel files

Load data from Excel spreadsheets (.xlsx) into Pixeltable tables.

Data Import/Export · Notebook · Updated

Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.

How it works

You use pxt.create_table() with an Excel file path as the source parameter. Pixeltable infers column types automatically.

What it covers

  • Import Excel files directly into tables
  • Handle multiple sheets
  • Override column types when needed

What it uses

Install
terminal
pip install pixeltable openpyxl pandas
Pixeltable calls
pxt.create_table()add_computed_column()

A look at the code

data-import-excel.ipynb
# Import Excel file directly
orders = pxt.create_table(
'excel_demo/orders',
source=str(excel_path),
source_format='excel', # Hint for Excel format
)

One cell of the notebook, copied as it is. Open it in Colab for the rest.

Browse all 103