- Fixed IE 11 error
"XPathResult is undefined"
by including a polyfill for XPath. This resulted in the browser bundle becoming larger in size by 100 kilobytes.
-
(breaking change) Calling this library with
getSheets: true
option now returns an array of objects of shape{ name }
rather than an object of shape{ [id]: 'name' }
. Same's for calling this library withproperties: true
option. -
(breaking change) Previous versions returned empty data in case of an error. Now if there're any errors they're thrown as-is and not suppressed.
-
(unlikely breaking change) Previous versions read the
sheet
having ID1
by default. It was discovered that this could lead to unintuitive behavior in some Excel editors when sheets order is changed by a user: in some editors a sheet with ID1
could be moved to, for example, the second position, and would still have the ID1
so for such Excel files by default the library would read the second sheet instead of the first one which would result in confusing behavior. In any case, numerical sheet IDs are inherently internal to the Excel file structure and shouldn't be externalized in any way (in this case, in the code reading such files) so the library now still accepts the numericalsheet
parameter but rather than being interpreted as a numerical sheet ID it's now interpreted as a numerical sheet index (starting from1
). If your code passes a numericalsheet
ID parameter to the library then it will most likely behave the same way with the new version because in most cases a numerical sheet ID is the same as a numerical sheet index. This change is very unlikely to break anyone's code, but just to conform with the SEMVER specification this change is released as a "breaking change" because theoretically there could exist some very rare users affected by the change. -
(very unlikely breaking change) Removed legacy support for numerical
sheet
IDs passed not as numbers but as strings. For example,sheet: "2"
instead ofsheet: 2
. A stringsheet
parameter is now always treated as a sheet name.
-
Fixed
NaN
s appearing in the input instead ofnull
s (and empty columns not being trimmed). -
Added "smart date parser" which autodetects and parses most date formats.
-
(breaking change) If using
readXlsx()
withoutschema
parameter it now parses boolean cell values astrue
/false
and numerical cell values are now parsed as numbers, and also date cell values are parsed as dates in some cases (numbers otherwise). If usingreadXlsx()
withschema
parameter then there are no breaking changes. -
Added
dateFormat
parameter (e.g.MM/DD/YY
) for parsing dates automatically when usingreadXlsx()
withoutschema
parameter. -
Added
read-excel-file/json
export forconvertToJson()
.
- Refactored exports.
- Fixed some empty columns returning an empty string instead of
null
. - Added
Integer
type for integerNumber
s. AlsoURL
andEmail
. - Export
parseExcelDate()
function. - If both
parse()
andtype
are defined in a schema thenparse()
takes priority overtype
.
- Rewrote
schema
JSON parsing.
- Added
schema
option for JSON parsing.
- Initial release.