2019年10月11日
vbs MEMO book open
Option Explicit
Dim Rng,fso
Dim time5
sub window_onload()
call pageVis("TopPage")
end sub
sub exceltimer()
time5=Window.setTimeout("excel()",1000)
end sub
' Excel起動
sub excel()
document.getElementById("status").style.visibility="visible"
Dim ex,book,sheet,full_path,Rngs
Set ex = CreateObject("Excel.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
ex.Visible = false
ex.DisplayAlerts = false
full_path = absolute_path( "1DB/book1.xlsx" )
set book = ex.Workbooks.Open( full_path )
set sheet = book.Sheets(1)
Rngs=sheet.Range(sheet.Cells(1,1),sheet.Cells(10,10))
Rng=Rngs 'msgbox Rng(10,2)
'Workbookを閉じる
book.Close(false)
document.getElementById("status").style.visibility="hidden"
call setting
end sub
Function absolute_path( path )
absolute_path= fso.getAbsolutePathName( path )
End Function
Dim Rng,fso
Dim time5
sub window_onload()
call pageVis("TopPage")
end sub
sub exceltimer()
time5=Window.setTimeout("excel()",1000)
end sub
' Excel起動
sub excel()
document.getElementById("status").style.visibility="visible"
Dim ex,book,sheet,full_path,Rngs
Set ex = CreateObject("Excel.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
ex.Visible = false
ex.DisplayAlerts = false
full_path = absolute_path( "1DB/book1.xlsx" )
set book = ex.Workbooks.Open( full_path )
set sheet = book.Sheets(1)
Rngs=sheet.Range(sheet.Cells(1,1),sheet.Cells(10,10))
Rng=Rngs 'msgbox Rng(10,2)
'Workbookを閉じる
book.Close(false)
document.getElementById("status").style.visibility="hidden"
call setting
end sub
Function absolute_path( path )
absolute_path= fso.getAbsolutePathName( path )
End Function
【このカテゴリーの最新記事】
-
no image
-
no image
-
no image
-
no image
-
no image
posted by vbahtmlmemo at 10:51| (カテゴリなし)