本帖最后由 wyb 于 2022-12-31 10:26 编辑
1.上传包含附加的excel
例如包含附件的excel:
2.获取sheet并copy到另一个workbook发生异常
附:
MultipartFile file; // 上传的excel文件
Workbook workbook = new Workbook();
workbook.open(file.getInputStream());
List<IWorksheet> worksheets = Lists.newArrayList();
worksheets.add(workbook.getWorksheets().get(0));worksheets.forEach(iWorksheet -> {
iWorksheet.copy(existWorkbook);
});
|
|