Releases: stevetarver/excel-as-json
Bug fix: 23, 30
Fix intermittent dest dir create and then file write failures
Project should create missing destination dir if it does not exist.
Was using fs.mkdir which may or may not complete before attempting
a file write. Changed to use fs.mkdirSync.
Also removes this deprecation warning in node 7.x
(node:72327) DeprecationWarning: Calling an asynchronous function
without callback is deprecated.
Read sheets other than 1, omit empty fields
Breaking Changes
processFile()
signature replaces isColOriented boolean with an options object to allow future feature addition without breaking existing users.
New Features
- Add
sheet
option to specify a 1-based index into the Excel sheet collection - all of your data in a single Excel workbook. - Add
omitEmptyFields
option that removes an object key-value if the corresponding Excel cell is empty.
Notes
The options
object is validated when processFile()
is called; you may omit it completely to accept defaults, or simply provide the options that you want to be different from defaults.
Bug fix
- Fixed value type conversion to return empty strings instead of converting them to 0.
- Updated 'excel' dependency version which resolves problems with empty datasets from valid files.
Version bump
Updated package version to match release tag
Update excel.js dependency to update its libxmljs dependency
Users have reported install failures on Node.js v6.2.1, or windows due to libxmljs compilation. Updating to excel.js v0.1.6 in the hopes this fixes that issue
Update dependencies
No package code changes, only dependency updates.
Feature complete
- Changed process() to processFile() to avoid name collision with node's process object
- Automatically convert text numbers and booleans to native values
- Create destination directory if it does not exist
Feature complete
The main process function now reflects inherent async nature of reading xlsx files and writing files. Also allow returning data without writing a file. Improved unit test coverage to 100%.
Holding off on a 1.0.0 version until there is some burn time and I decide whether to include a processSync variant.
Initial functionality
Initial functionality proven locally.