本帖最后由 Wilson.Zhang 于 2025-4-16 11:10 编辑
产品:GcExcel
版本:7.2.2
调研编号:DOCXLS-12129
Last Review:2025-04-16
当前进展:VLOOKUP引用外部工作簿所致,在进一步调研修复方案。
workbook.calculate()报错
public static void main(String[] args) {
String filePath = "L:\\下载文件\\1601-0010-0001-固定资产减值准备测试表.xlsx";
FileOutputStream fos = null;
try {
Workbook workbook = new Workbook();
workbook.open(filePath);
IWorksheet iWorksheet = workbook.getWorksheets().get(0);
int rowCount = iWorksheet.getRowCount();
workbook.calculate();
fos = new FileOutputStream(filePath);
workbook.save(fos);
} catch (Exception e) {
e.printStackTrace();
}finally {
if (null != fos) {
try {
fos.close();
} catch (Exception var2) {
}
}
}
System.out.println();
}
java.lang.ArrayIndexOutOfBoundsException: 15616
at com.grapecity.documents.excel.i.cM.d(Unknown Source)
at com.grapecity.documents.excel.j.j.b(Unknown Source)
at com.grapecity.documents.excel.i.ad.a(Unknown Source)
at com.grapecity.documents.excel.i.ae.b(Unknown Source)
at com.grapecity.documents.excel.i.cP.b(Unknown Source)
at com.grapecity.documents.excel.i.cP.a(Unknown Source)
at com.grapecity.documents.excel.o.j.I.a(Unknown Source)
at com.grapecity.documents.excel.o.j.I.i(Unknown Source)
at com.grapecity.documents.excel.i.at.d(Unknown Source)
at com.grapecity.documents.excel.i.f.b(Unknown Source)
at com.grapecity.documents.excel.n.s.a(Unknown Source)
at com.grapecity.documents.excel.n.n.j(Unknown Source)
at com.grapecity.documents.excel.n.n.a(Unknown Source)
at com.grapecity.documents.excel.n.q.a(Unknown Source)
at com.grapecity.documents.excel.n.q.a(Unknown Source)
at com.grapecity.documents.excel.n.p.i(Unknown Source)
at com.grapecity.documents.excel.K.aX.n(Unknown Source)
at com.grapecity.documents.excel.Workbook.calculate(Unknown Source)
at cn.com.bdo.dgCenter.service.testService.main(testService.java:155)
Disconnected from the target VM, address: '127.0.0.1:50030', transport: 'socket'
|
|