图片附件: 游客没有浏览图片的权限,请
登录 或
注册
程序代码:
cPath = ADDBS(JUSTPATH(SYS(16)))
SET DEFAULT TO (cPath)
sc = CREATEOBJECT("ScriptControl")
sc.Language = "VBScript"
TEXT TO vbsCode TEXTMERGE NOSHOW PRETEXT 7
function fun(cFile)
dim excel
set excel = createobject("Excel.Application")
excel.workbooks.open(cFile)
excel.Cells.Replace ChrW(&hA0), ""
nRow = excel.sheets(1).UsedRange.Rows.Count
nCol = excel.sheets(1).UsedRange.Columns.Count
fun = excel.Cells(1,1).Resize(nRow,nCol).Value
excel.ActiveWorkBook.Saved = 1
excel.workbooks.close
excel.quit
end function
ENDTEXT
sc.AddCode(vbsCode)
arr = sc.Run("fun", cPath+"表格.xls")
CREATE CURSOR tt (f1 M)
INSERT INTO tt FROM ARRAY arr
SELECT * FROM tt