Updates to examples . Minor bug fix to format in Merge-Multiple

This commit is contained in:
jhoneill
2018-09-10 14:26:29 +01:00
parent 65b1f79d53
commit ef4ac9777b
25 changed files with 326 additions and 72 deletions

View File

@@ -1,10 +1,13 @@
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
$p = Get-Process | Select-Object Company, Handles | Export-Excel c:\temp\testBackgroundColor.xlsx -ClearSheet -KillExcel -PassThru
$path = "$env:TEMP\testBackgroundColor.xlsx"
$p = Get-Process | Select-Object Company, Handles | Export-Excel $path -ClearSheet -PassThru
$ws = $p.Workbook.WorkSheets[1]
$totalRows = $ws.Dimension.Rows
Set-Format -Address $ws.Cells["B2:B$($totalRows)"] -BackgroundColor LightBlue
#Set the range from B2 to the last active row. s
Set-ExcelRange -Range $ws.Cells["B2:B$($totalRows)"] -BackgroundColor LightBlue
Export-Excel -ExcelPackage $p -show -AutoSize