Skip to main content

Generate RDF from Excel spreadsheets.

Project description

Python excel2rdf

Generate RDF from Excel spreadsheets.


pip3 install excel2rdf


$ excel2rdf --help

  -f TEXT  RDF format
  --help   Show this message and exit.
excel2rdf input.xlsx output.ttl

Excel Formatting

The first sheet in the Excel document (Sheet1) can be named anything. It is used as the data table.


The first column of the header must be named uri. The value of the cells in the column uri will be the fully qualified URI of a resource for the given row. If left blank, excel2rdf will generate a random URI.

The other columns of the header denote the predicate of the triple statement in curie format. The cell values can be either a curie or any literal value.

Example Data Sheet

uri rdf:type schema:name
schema:Person John Smith schema:Person Jane Smith@en

Yes, you can also use language tags on your string literal values.

Prefix Declaration

A sheet named prefixes must exist. This sheet contains the prefix declarations. The first cell in the row must begin with a #. The second cell must be the prefix value and the third cell must be the fully qualified base URI of the prefix.

A single base URI is declared with the first cell containing ## and the second cell containing the base URI.

Example Prefix and Base URI Declaration

# schema
# rdf

Full Excel Spreadsheet Example

See examples/manufacturers.xlsx for a full example.


  • The . character cannot be used in the headings of each column.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for excel2rdf, version 0.1.12
Filename, size File type Python version Upload date Hashes
Filename, size excel2rdf-0.1.12-py3-none-any.whl (16.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size excel2rdf-0.1.12.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page