5金币
本帖最后由 Lynn.Dou 于 2022-2-14 16:31 编辑
- Workbook workbook = new Workbook();
- workbook.open("D:\\ZS_yingyun_1.xlsx");
- IWorksheets worksheets = workbook.getWorksheets();
- Workbook workbookClone = new Workbook();
- workbookClone.getWorksheets().add();
- for (IWorksheet worksheet : worksheets) {
- String json = worksheet.toJson();
- workbookClone.getWorksheets().add().fromJson(json);
- }
- workbookClone.save("D:\\aaa.xlsx");
复制代码 源文件在附件里面:冻结行在23行开始
通过json转换之后,冻结行变成了15行
|
|