VBS 스 크 립 트 지식

1.엑셀 시트 처리
dim OExcel            '                            ';'
dim oExcel,oWb,oSheet '      , ','  

set oExcel = CreateObject("Excel.Application")    'set:            
oExcel.WorkBooks.Open("D:\1.xls")                 '    
oExcel.Cells(1,1).Value = "T1"                    '   A1   "T1",           1  
oExcel.WorkBooks.Close 	                          '     
oExcel.Quit 			                          '  excel

2.배열
dim t1,t2
t1 = array("b","c","d")        '      array   ,         ubound(t1)  
t2 = array("b","c","d")        '           

3.순환
dim i1,i2
for i1=0 to ubound(t1)
    for i2=0 to ubound(t2)
        oExcel.Cells(count,1).Value = t1(i1) 
		oExcel.Cells(count,2).Value = t2(i2)
        count = count + 1
    next
next

4.조건
if i1=0 then
	oExcel.Cells(count,10).Value = "1"'D1
else
	oExcel.Cells(count,10).Value = "0"'D1
end if

좋은 웹페이지 즐겨찾기