set objExcel = CreateObject("Excel.Application")
objExcel.Application.Visible=false
objExcel.WorkBooks.Open(exectfile)
set objExcelBook = objExcel.ActiveWorkBook
set objExcelSheets = objExcelBook.Worksheets
set objExcelSheet = objExcelBook.Sheets(1)
'取资产负债表内数据
for i = 1 to 29
myarray(i,1) = trim(objExcelSheet.Cells(i+4,1).value)
myarray(i,2) = trim(objExcelSheet.Cells(i+4,2).value)
myarray(i,3) = trim(objExcelSheet.Cells(i+4,5).value)
myarray(i,4) = trim(objExcelSheet.Cells(i+4,6).value)
if isNumeric(trim(objExcelSheet.Cells(i+4,7).value)) then
myarray(i,5) = FormatNumber(trim(objExcelSheet.Cells(i+4,7).value),1)
else
myarray(i,5) = trim(objExcelSheet.Cells(i+4,7).value)
end if
myarray(i+29,1) = trim(objExcelSheet.Cells(i+4,8).value)
myarray(i+29,2) = trim(objExcelSheet.Cells(i+4,9).value)
myarray(i+29,3) = trim(objExcelSheet.Cells(i+4,12).value)
myarray(i+29,4) = trim(objExcelSheet.Cells(i+4,13).value)
if isNumeric(trim(objExcelSheet.Cells(i+4,14).value)) then
myarray(i+29,5) = FormatNumber(trim(objExcelSheet.Cells(i+4,14).value),1)
else
myarray(i+29,5) = trim(objExcelSheet.Cells(i+4,14).value)
end if
next
'关闭EXCEL
objExcel.ActiveWorkBook.close
objExcel.WorkBooks.close
objExcel.DisplayAlerts=false
objExcel.Quit
set objExcelSheet = nothing
set objExcelSheet = nothing
set objExcelBook = nothing
set objExcel = Nothing