@strategies/excelerator
v1.1.0
Published
We have Excel, but we want JSON
Downloads
3
Keywords
Readme
Sasaki's Excelerator
We have Excel, but we want JSON or CSV
Install
yarn add @strategies/excelerator
Example
(new Excelerator())
.load('data.xlsx')
.sheet('DashiData')
.row(2)
.columns({
'A:id': [required, trim],
'B:name': [required, trim, replace('unnamed Rhino ', '')],
'D:gfa': [setDefault(30000)],
'F:cost': [required],
'E:costPerSF': [alias('cost')],
'G:program': [required, trim],
'H:scenario': [replace('all scenarios', ''), nullable],
'I:phase': [(value, source, target) => `Phase ${value}-${target['scenario']}`],
})
.writeJSON('../assets/projects.json', 4);