Files
ImportExcel/ExportedCommands/New-ExcelStyle.ps1

47 lines
1.7 KiB
PowerShell

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,
[Switch]$Hidden,
[Switch]$Locked,
[Switch]$Merge
)
$PSBoundParameters
}