.../node_modules/cfb/cfb.js:370
var blob = file.slice(0,512);
^
TypeError: file.slice is not a function
at parse (.../node_modules/cfb/cfb.js:370:17)
at Object.read (.../node_modules/cfb/cfb.js:688:9)
My code is this:
const cfb = CFB.read(file, { type: 'file' })
// const cfb = CFB.parse(data)
const vbaDirEntry = CFB.find(cfb, 'VBA')
if (!vbaDirEntry) {
throw new Error('VBA root not found')
}
const vbaDir = CFB.read(cfb, vbaDirEntry)
const modules = {}
for (const entry of vbaDir.FullPaths) {
console.log(entry)
}
My code is this: