import console;
import godking.libxl;
import string;
//批量生成工作表的表名
filepath = "\工作簿1.xlsx"
var book = godking.libxl.open(filepath);
for(i=1; book.getSheetCount();1){
var sheet = book.sheet(i);
for(n=1;sheet.getMergeCount();1){
var _,row,col = sheet.getMergeByindex(n);
var t = sheet.getCellStr(row,col);
if ..string.find(t,"@单位(子单位)"){
var _,row,col = sheet.getMergeByindex(n+1);
if row and col {
console.dump(string.format("发现:%s,位于表[%s]%i行,%i列",sheet.getCellStr(row,col),book.getSheetName(i),row,col));
} else {
console.dump("发现子单位,但后面不是要找的内容");
}
break;
}
}
}
console.pause();