Given a Frictionless Table Schema (like this), generate an Excel template with input validation (like this).
Download a sample schema.yaml
, and then:
pip install tableschema-to-template
ts2xl.py schema.yaml template.xlsx
# Open with Excel:
open template.xlsx
Or to use inside Python:
from tableschema_to_template import create_xlsx
schema = {'fields': [{
'name': 'a_number',
'description': 'A number!',
'type': 'number'
}]}
create_xlsx(schema, '/tmp/template.xlsx')
Additional docs:
- Enum constraints transformed into pull-downs.
- Field descriptions transformed into comments in header.
- Float, integer, and boolean type validation, with range checks on numbers.
More details in the changelog.
If you want to construct Excel files programmatically, XlsxWriter is great!
For validated data entry, from the Frictionless community:
table-schema-resource-template
: Generates templates, but doesn't go beyond row headers.data-curator
: Desktop application for data entry based on Table Schema.csv-gg
: Web app which serves data entry form, and uses Validata API for validation.
From the biomedical ontologies community: