add clearall to set-ExcelRange;

This commit is contained in:
jhoneill
2019-07-24 12:01:06 +01:00
parent 8b28172616
commit 8759070636
2 changed files with 6 additions and 2 deletions

View File

@@ -124,7 +124,10 @@
$Range = $WorkSheet.Cells[$Range]
}
elseif ($Range -is [string]) {Write-Warning -Message "The range pararameter you have specified also needs a worksheet parameter." ;return}
#else we assume Range is a range.
#else we assume $Range is a range.
if ($ClearAll) {
$Range.Clear()
}
if ($ResetFont) {
$Range.Style.Font.Color.SetColor( ([System.Drawing.Color]::Black))
$Range.Style.Font.Bold = $false
@@ -332,6 +335,7 @@ if (Get-Command -ErrorAction SilentlyContinue -name Register-ArgumentCompleter)
Register-ArgumentCompleter -CommandName Set-ExcelRange -ParameterName FontName -ScriptBlock $Function:ListFonts
Register-ArgumentCompleter -CommandName Set-ExcelRow -ParameterName FontName -ScriptBlock $Function:ListFonts
}
function Expand-NumberFormat {
<#
.SYNOPSIS