'vMasterFilePath=WScript.Arguments(0)
'vLogPath=WScript.Arguments(1)
vMasterFilePath="C:\Users\admin\Desktop\Operation\Data.xlsx"
vLogPath="C:\Users\admin\Desktop\Operation\Log.txt"
'For write the log'
Set objFS = CreateObject("Scripting.FileSystemObject")
Set FSO_Handle = objFS.OpenTextFile(vLogPath,8,True)
Set objExcel = CreateObject("Excel.Application")
objExcel.DisplayAlerts = False
objExcel.Visible = True
Set objWorkbook1 =objExcel.Workbooks.Open(vMasterFilePath)
For Each wks In objWorkbook1.Worksheets
MsgBox("sheet name"& wks.Name)
If objExcel.Worksheets(wks.name).visible=False Then
MsgBox(wks.Name)
objExcel.Worksheets(wks.name).visible=True
count=count+1
End If
If wks.autofilterMode Then
wks.autofilterMode = False
End If
objExcel.Worksheets(wks.name).range("A1:BY100").ClearOutline
Next
objWorkbook1.Save
objWorkbook1.Close True
objExcel.Quit
0 comments:
Post a Comment