Giter VIP home page Giter VIP logo

tableschema-to-template's Introduction

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:

From the biomedical ontologies community:

  • CEDAR: Data entry tool based on ontologies.
  • Webulous: Google sheets plugin that adds pulldowns based on ontology terms.

tableschema-to-template's People

Contributors

john-conroy avatar kynan avatar mccalluc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tableschema-to-template's Issues

--idempotent

There's an embedded timestamp in the Excel file. Can we mock the clock so regenerated binary files match exactly?

Add VBA functions for regexes?

This looks like a good source.

Concerns:

  • Excel documents with macros are likely to be flagged as potential security risks.
  • VBA code is a binary blob, and we won't easily be able to maintain it.
  • Excel is proprietary: Shouldn't jump through hoops to work with it.

README tweaks

  • Move dev instruction out, so pypi is clean.
  • Add info about usage withing python.

present at a Frictionless call?

Hi @mccalluc This is awesome! I'm wondering if you would be willing to present this at an upcoming Frictionless community call (perhaps in March)? Or, would you be interested in doing a short write up/blog about this that would go on the Frictionless site (https://frictionlessdata.io/blog/)? I would happily help write/edit a blog. Let me know if either of those is of interest to you (you can email me at [email protected] if this is annoying to discuss in an issue). Thanks for the really cool work :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.