xsheetjs/demos/vue/nuxt.config.js
SheetJS 0b6ebc67da DBF preserve field properties
- DBF write type N and roundtrip C length (fixes #1888 h/t@bandizsolt)
- clean up xhr demo (fixes #2604 h/t @UP2022742)
- clean up vue / nuxt demo
2022-03-10 00:31:13 -05:00

21 lines
434 B
JavaScript

// nuxt.config.js
import { readFile, utils } from 'xlsx';
const parseXLSX = (file, { path }) => {
const wb = readFile(path);
const o = wb.SheetNames.map(name => ({ name, data: utils.sheet_to_json(wb.Sheets[name])}));
return { data: o };
}
export default {
modules: [ '@nuxt/content' ],
content: {
extendParser: {
".numbers": parseXLSX,
".xlsx": parseXLSX,
".xls": parseXLSX
// ...
}
},
}