本帖最后由 Wilson.Zhang 于 2025-4-16 11:15 编辑
产品:GcExcel
版本:7.2.2
调研编号:DOCXLS-12157
Last Review:2025-04-16
当前进展:修复中。
为啥索引号这个名称在getRefersTo的时候会报错
索引号
=IF(项目索引="","",项目索引&IF(OR(工作表名="实质性程序",ISERROR('D:\Users\Administrator\AppData\Roaming\Microsoft\AddIns\[工作底稿编制.xla]'!SHEETINDEX(""))),"",MAX(0,'D:\Users\Administrator\AppData\Roaming\Microsoft\AddIns\[工作底稿编制.xla]'!SHEETINDEX(工作表名)-'D:\Users\Administrator\AppData\Roaming\Microsoft\AddIns\[工作底稿编制.xla]'!SHEETINDEX("实质性程序"))))
public static void main(String[] args) {
String filePath = "L:\\下载文件\\1514-0001-0001-使用权资产明细表.xlsx";
try {
Workbook workbook = new Workbook();
workbook.open(filePath);
INames iNames = workbook.getNames();
int count = iNames.getCount();
if (count > 0) {
for (int index = count; index > 0; index--) {
IName iName = iNames.get(index - 1);
System.out.print(iName.getName() + " : " );
String refersTo = iName.getRefersTo();
System.out.println(refersTo);
}
}
} catch (Exception e) {
e.printStackTrace();
}
System.out.println();
}
索引号 :
com.grapecity.documents.excel.InvalidFormulaException: The formula in defined names is invalid! [There's a problem with this formula.]
at com.grapecity.documents.excel.n.h.a(Unknown Source)
at com.grapecity.documents.excel.n.h.a(Unknown Source)
at com.grapecity.documents.excel.an.getRefersTo(Unknown Source)
at cn.com.bdo.dgCenter.service.testService.main(testService.java:201)
Disconnected from the target VM, address: '127.0.0.1:62228', transport: 'socket'
|
|