Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Patch_Dist="\\DC1-APP12\SSIS-Pkgs\Solutions\MgmtFolder\IsNewXcode_SetiReport_PF\"
- $ExcelRD = New-Object -ComObject Excel.Application
- # Создаём Excel
- $filePath = "\\DC1-APP12\SSIS-Pkgs\Solutions\MgmtFolder\IsNewXcode_SetiReport_PF.xlsm"
- $xlExcel8 = 56
- # Делаем Excel видимым
- $ExcelRD.Visible = $true
- # Отключаем уведомления
- $ExcelRD.DisplayAlerts = $false;
- # Добавляем рабочую книгу
- $WorkBook = $ExcelRD.Workbooks.Open($filePath)
- # Цепляемся к ExcelRD листу
- $WorkSheet = $ExcelRD.WorkSheets.Item(1)
- # Обновляем
- $ExcelRD.ActiveWorkbook.RefreshAll();
- $Filename = 'IsNewXcode_SetiReport_PF'
- $Workbook.SaveAs($Patch_Dist+$Filename+".xls",56)
- $WorkSheet = $null
- $WorkBook.Close($false)
- $ExcelRD.Quit()
- $ExcelRD = $null
- [GC]::Collect()
- [GC]::WaitForPendingFinalizers()
- [GC]::Collect()
- [GC]::WaitForPendingFinalizers()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement