Utilities create XLSForm template for nodejs
It generate excel
workbook contains survey
, choices
and settings
worksheets contains most commonly used xlsform fields
$ npm install --save xlsform-template
var template = new require('xlsform-template')({
setting:{
formTitle:'Registration',
formId:'registration_form'
}
});
//write template to file
template.writeFile(_<filename>_, function(error,result) {
...
});
//download it on http request
app.get('/xlsform', function(request, response) {
var template = new Template({
setting:{
formTitle:'Registration',
formId:'registration_form'
}
});
template.download(response, {
filename: filename
});
});