Tabular Data Importer
The Tabular Data Importer is a set of components and patterns for asking users for data as a spreadsheet. These patterns are useful when users need to provide a lot of information at once to a service and are likely to be drawing the information from an existing source.
They can be used as part of the Prototype Kit and also in production use as part of a real service. Their designs are compatible with the GOV.UK Design System.
Patterns
Ask users for:
Components
Getting started
The Importer is available as a software package that can be installed into the Prototype Kit.
Installation
Install the plugin by typing:
npm install 'https://gitpkg.vercel.app/register-dynamics/data-import/lib/importer?main'
Then run the Prototype Kit and visit the "Manage Prototype" section to get help on using the Importer.
Now add these lines to the bottom of app/routes.js
to configure the
prototype to receive and
process
spreadsheets:
const importer = require("@register-dynamics/importer"); const cfg = require("govuk-prototype-kit/lib/config"); importer.Initialise(cfg.getConfig(), router, govukPrototypeKit);
Configuration
Finally, add some fields to app/config.js
that the user will be asked for
when using the
"Identify columns" template:
"fields": [ "Code", "Name", "Speciality" ]
You are now ready to use the Tabular Data Importer. You can get started by following a pattern for requesting tabular data.