1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.import
console; import
godking.libxl;import
string
;- filepath =
"\res\5-1#\1.2、5-1#管内穿线和槽盒内敷线 检验批质量验收记录.xls"
var
book = godking.libxl.open(filepath)var
sheet = book.sheet()var
vals= sheet.getTable()var
newvals = {}for
(i=1
;-
var
a = vals[i] -
for
(j=1
; -
if
(a[j] != ""
){ -
table
.push(newvals,{i , j,a[j]}) - }
- }
-
- }
- book.close()
var
name = "子单位"
for
(i=1
;-
if
(string
.match(newvals[i][3
],name) != null
){ - console.log(newvals[i+
1
][1
],newvals[i+1
][2
]) - }
-
elseif
(string
.match(newvals[i][3
],name) != null
){ - console.log(
"行"
+newvals[i][1
],"列"
+newvals[i][2
]) - }
- }
- console.pause();