根据这串html代码生成npm里面的xlsxjs导出代码一次性写出完整代码:!doctypehtmlheadmeta http-equiv=Content-Type content=texthtml; charset=utf-8meta name=ProgId content=ExcelSheetmeta name=Generator content=AsposeCell 2270styletr
const XLSX = require('xlsx');
const data = [ ["新生可期-复发套细胞淋巴瘤患者援助项目项目"], ["配送捐赠药物说明书"], ["接受药房:", "", "", "", ""], ["接收地址:", "", "", "", ""], ["配送单号:", "", "", "装箱时间:", ""], ["接收时间:", "", "", "接收温度:", ""], ["指定药师:", "", "", "配送人:", ""], ["配送药品明细:", "", "", "", ""], ["药品名称", "药品规格", "药品批号", "有效期", "数量"], ["康可期/阿可替尼胶囊", "", "", "", ""], ["数量合计", "", "", "", ""], ["药房签收:", "", "", "", ""], ["确认包装完整:", "", "", "", ""], ["其他情况备注", "", "", "", ""], ["接收人签字:", "", "", "盖 章 :", ""] ];
const ws = XLSX.utils.aoa_to_sheet(data); const wb = XLSX.utils.book_new(); XLSX.utils.book_append_sheet(wb, ws, "Sheet1"); XLSX.writeFile(wb, "output.xlsx")
原文地址: https://www.cveoy.top/t/topic/fuUP 著作权归作者所有。请勿转载和采集!