UNPKG

read-excel-file

Version:

Read small to medium `*.xlsx` files in a browser or Node.js. Parse to JSON with a strict schema.

11 lines 390 B
export 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