把这些表放在一个文件夹中,遍历,依次打开EXCEL,将内容读入数组,插入汇总表中。遍历代码自己写,读入、插入代码供参考:
Create table zsjh (yxdm c(10),yxmc c(70), zydm c(10),zymc c(200), xz c(16), bzk c(15), sf c(10),cs c(10),shouf c(20), zsjh n(10,0), jh17 n(10,0), jh18 n(10,0), jh19 n(10,0), jh20 n(10,0),fs17 n(10,0), fs18 n(10,0), fs19 n(10,0), fs20 n(10,0),wc17 n(15,0), wc18 n(15,0), wc19 n(15,0), wc20 n(15,0),zhbfd n(12,7), xkkm c(60),bz m,ckxx m)
ox = CREATEOBJECT("Excel.Application")
&&已有汇总表的话,此句可省略。
ox.workbooks.open(GETFILE("xlsx"))
&&改为遍历
lnrow = ox.activesheet.usedrange.rows.count
lncol = ox.activesheet.usedrange.columns.count
DIMENSION laxls(lnrow,lncol)
laxls = ox.activesheet.usedrange.value
ox.quit
insert into zsjh from array laxls
brow