-
Notifications
You must be signed in to change notification settings - Fork 413
/
Copy pathNew-ExcelStyle.ps1
48 lines (48 loc) · 1.76 KB
/
New-ExcelStyle.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
function New-ExcelStyle {
[CmdletBinding()]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'Does not change system State')]
param (
[Alias("Address")]
$Range ,
[Alias("NFormat")]
$NumberFormat,
[OfficeOpenXml.Style.ExcelBorderStyle]$BorderAround,
$BorderColor=[System.Drawing.Color]::Black,
[OfficeOpenXml.Style.ExcelBorderStyle]$BorderBottom,
[OfficeOpenXml.Style.ExcelBorderStyle]$BorderTop,
[OfficeOpenXml.Style.ExcelBorderStyle]$BorderLeft,
[OfficeOpenXml.Style.ExcelBorderStyle]$BorderRight,
[Alias('ForegroundColor')]
$FontColor,
$Value,
$Formula,
[Switch]$ArrayFormula,
[Switch]$ResetFont,
[Switch]$Bold,
[Switch]$Italic,
[Switch]$Underline,
[OfficeOpenXml.Style.ExcelUnderLineType]$UnderLineType = [OfficeOpenXml.Style.ExcelUnderLineType]::Single,
[Switch]$StrikeThru,
[OfficeOpenXml.Style.ExcelVerticalAlignmentFont]$FontShift,
[String]$FontName,
[float]$FontSize,
$BackgroundColor,
[OfficeOpenXml.Style.ExcelFillStyle]$BackgroundPattern = [OfficeOpenXml.Style.ExcelFillStyle]::Solid ,
[Alias("PatternColour")]
$PatternColor,
[Switch]$WrapText,
[OfficeOpenXml.Style.ExcelHorizontalAlignment]$HorizontalAlignment,
[OfficeOpenXml.Style.ExcelVerticalAlignment]$VerticalAlignment,
[ValidateRange(-90, 90)]
[int]$TextRotation ,
[Alias("AutoFit")]
[Switch]$AutoSize,
[float]$Width,
[float]$Height,
[Alias('Hide')]
[Switch]$Hidden,
[Switch]$Locked,
[Switch]$Merge
)
$PSBoundParameters
}