mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-11 05:43:17 +00:00
Relayout of Setformat for readablity
This commit is contained in:
@@ -107,10 +107,14 @@
|
|||||||
if ($StrikeThru) {$Address.Style.Font.Strike = $true }
|
if ($StrikeThru) {$Address.Style.Font.Strike = $true }
|
||||||
if ($FontShift) {$Address.Style.Font.VerticalAlign = $FontShift }
|
if ($FontShift) {$Address.Style.Font.VerticalAlign = $FontShift }
|
||||||
if ($FontColor) {$Address.Style.Font.Color.SetColor( $FontColor ) }
|
if ($FontColor) {$Address.Style.Font.Color.SetColor( $FontColor ) }
|
||||||
|
if ($NumberFormat) {$Address.Style.Numberformat.Format = $NumberFormat }
|
||||||
if ($BorderAround) {
|
if ($TextRotation) {$Address.Style.TextRotation = $TextRotation }
|
||||||
$Address.Style.Border.BorderAround($BorderAround, $BorderColor)
|
if ($WrapText) {$Address.Style.WrapText = $true }
|
||||||
}
|
if ($HorizontalAlignment) {$Address.Style.HorizontalAlignment = $HorizontalAlignment }
|
||||||
|
if ($VerticalAlignment) {$Address.Style.VerticalAlignment = $VerticalAlignment }
|
||||||
|
if ($Value) {$Address.Value = $Value }
|
||||||
|
if ($Formula) {$Address.Formula = $Formula }
|
||||||
|
if ($BorderAround) {$Address.Style.Border.BorderAround($BorderAround, $BorderColor)}
|
||||||
|
|
||||||
if ($BorderBottom) {
|
if ($BorderBottom) {
|
||||||
$Address.Style.Border.Bottom.Style=$BorderBottom
|
$Address.Style.Border.Bottom.Style=$BorderBottom
|
||||||
@@ -132,12 +136,6 @@
|
|||||||
$Address.Style.Border.Right.Color.SetColor($BorderColor)
|
$Address.Style.Border.Right.Color.SetColor($BorderColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($NumberFormat) {$Address.Style.Numberformat.Format = $NumberFormat }
|
|
||||||
if ($TextRotation) {$Address.Style.TextRotation = $TextRotation }
|
|
||||||
if ($WrapText) {$Address.Style.WrapText = $true }
|
|
||||||
if ($HorizontalAlignment) {$Address.Style.HorizontalAlignment = $HorizontalAlignment }
|
|
||||||
if ($VerticalAlignment) {$Address.Style.VerticalAlignment = $VerticalAlignment }
|
|
||||||
|
|
||||||
if ($BackgroundColor) {
|
if ($BackgroundColor) {
|
||||||
$Address.Style.Fill.PatternType = $BackgroundPattern
|
$Address.Style.Fill.PatternType = $BackgroundPattern
|
||||||
$Address.Style.Fill.BackgroundColor.SetColor($BackgroundColor)
|
$Address.Style.Fill.BackgroundColor.SetColor($BackgroundColor)
|
||||||
@@ -179,13 +177,6 @@
|
|||||||
else {Write-Warning -Message ("Can hide a row or a column but not a {0} object" -f ($Address.GetType().name)) }
|
else {Write-Warning -Message ("Can hide a row or a column but not a {0} object" -f ($Address.GetType().name)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Value) {
|
|
||||||
$Address.Value = $Value
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($Formula) {
|
|
||||||
$Address.Formula = $Formula
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user