Public
Edited
Feb 23
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
async function generateZip(){
const list = generateWorkbook()
const files = await Promise.all(list.map(async (it)=>[it.path, await it.workbook.xlsx.writeBuffer()]))
const obj = {}
let stop = false
invalidation.then(()=>{
stop = true
})
for (const item of files){
if(stop) break
obj[item[0].replace(/\.csv$/, '.xlsx')] = item[1]
}
// return obj
// return Object.fromEntries(files)
const zip = fflate.zipSync(obj)
return zip
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
fflate = require('fflate@0.8.2/umd/index.js')
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more