read-excel-file
Version:
Read small to medium `*.xlsx` files in a browser or Node.js. Parse to JSON with a strict schema.
17 lines (16 loc) • 520 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _default = exports["default"] = {
createDocument: function createDocument(content) {
// if (!content) {
// throw new Error('No *.xml content')
// }
// A weird bug: it won't parse XML unless it's trimmed.
// https://github.com/catamphetamine/read-excel-file/issues/21
return new DOMParser().parseFromString(content.trim(), 'text/xml');
}
};
//# sourceMappingURL=xmlBrowser.js.map
;