tableschema-to-template0.0.13
tableschema-to-template0.0.13
Published
Given a Frictionless Table Schema, generates an Excel template with input validation
pip install tableschema-to-template
Package Downloads
Authors
Project URLs
Requires Python
>=3.6
tableschema-to-template
Given a Frictionless Table Schema (like this), generate an Excel template with input validation (like this).
Usage
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:
Features
- 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.
Related work
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: