sheetjs icon indicating copy to clipboard operation
sheetjs copied to clipboard

vue 项目中 解析带有拆分的xlsx文件 数据行数缺失问题

Open 2621697236 opened this issue 2 years ago • 1 comments

环境: node -v : v14.19.0 vue @2.6.14

如果xlsx文件中存在拆分,通过 antd vue 中的文件上传组件上传改文件,通过XLSX.utils.sheet_to_json 获取数据是缺少数据 观察WorkBook对象sheet对象的!ref值不对

请问怎么解决?

2621697236 avatar Jun 12 '22 09:06 2621697236

Check the value of ws["!ref"] when you read the file. It may not be including all of the cells.

If the range is incorrect, try copying and using update_sheet_range from https://github.com/SheetJS/sheetjs/wiki/General-Utility-Functions#updating-worksheet-range

If the range is correct, please share a file and we will take a closer look

SheetJSDev avatar Jun 12 '22 10:06 SheetJSDev

Share a file and we can reopen the issue.

SheetJSDev avatar Sep 07 '22 20:09 SheetJSDev