mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-11 13:53:20 +00:00
add clearall to set-ExcelRange;
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
Set-ExcelRow -Worksheet $ws -Heading Total -Value {"=sum($columnName`2:$columnName$endrow)" }
|
||||
|
||||
$Ws contains a worksheet object, and no Row number is specified so
|
||||
Set-ExcelRow will select the next row after the endof the data in
|
||||
Set-ExcelRow will select the next row after the end of the data in
|
||||
the sheet. The first cell in the row will contain "Total", and
|
||||
each of the other cells will contain
|
||||
=Sum(xx2:xx99)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user