mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-15 15:53:32 +00:00
Changes to match latest style rules (trailing spaces & position of null)
This commit is contained in:
@@ -847,7 +847,7 @@
|
|||||||
|
|
||||||
foreach ($chartDef in $ExcelChartDefinition) {
|
foreach ($chartDef in $ExcelChartDefinition) {
|
||||||
$params = @{}
|
$params = @{}
|
||||||
$chartDef.PSObject.Properties | ForEach-Object {if ($_.value -ne $null) {$params[$_.name] = $_.value}}
|
$chartDef.PSObject.Properties | ForEach-Object {if ( $null -ne $_.value) {$params[$_.name] = $_.value}}
|
||||||
Add-ExcelChart -Worksheet $ws @params
|
Add-ExcelChart -Worksheet $ws @params
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1296,8 +1296,8 @@ function Add-ExcelChart {
|
|||||||
if ($XAxisPosition) {$chart.XAxis.AxisPosition = $XAxisPosition}
|
if ($XAxisPosition) {$chart.XAxis.AxisPosition = $XAxisPosition}
|
||||||
if ($XMajorUnit) {$chart.XAxis.MajorUnit = $XMajorUnit}
|
if ($XMajorUnit) {$chart.XAxis.MajorUnit = $XMajorUnit}
|
||||||
if ($XMinorUnit) {$chart.XAxis.MinorUnit = $XMinorUnit}
|
if ($XMinorUnit) {$chart.XAxis.MinorUnit = $XMinorUnit}
|
||||||
if ($XMinValue -ne $null) {$chart.XAxis.MinValue = $XMinValue}
|
if ($null -ne $XMinValue) {$chart.XAxis.MinValue = $XMinValue}
|
||||||
if ($XMaxValue -ne $null) {$chart.XAxis.MaxValue = $XMaxValue}
|
if ($null -ne $XMaxValue) {$chart.XAxis.MaxValue = $XMaxValue}
|
||||||
if ($XAxisNumberformat) {$chart.XAxis.Format = $XAxisNumberformat}
|
if ($XAxisNumberformat) {$chart.XAxis.Format = $XAxisNumberformat}
|
||||||
|
|
||||||
if ($YAxisTitleText) {
|
if ($YAxisTitleText) {
|
||||||
@@ -1308,12 +1308,12 @@ function Add-ExcelChart {
|
|||||||
if ($YAxisPosition) {$chart.YAxis.AxisPosition = $YAxisPosition}
|
if ($YAxisPosition) {$chart.YAxis.AxisPosition = $YAxisPosition}
|
||||||
if ($YMajorUnit) {$chart.YAxis.MajorUnit = $YMajorUnit}
|
if ($YMajorUnit) {$chart.YAxis.MajorUnit = $YMajorUnit}
|
||||||
if ($YMinorUnit) {$chart.YAxis.MinorUnit = $YMinorUnit}
|
if ($YMinorUnit) {$chart.YAxis.MinorUnit = $YMinorUnit}
|
||||||
if ($YMinValue-ne $null) {$chart.YAxis.MinValue = $YMinValue}
|
if ($null -ne $YMinValue){$chart.YAxis.MinValue = $YMinValue}
|
||||||
if ($YMaxValue-ne $null) {$chart.YAxis.MaxValue = $YMaxValue}
|
if ($null -ne $YMaxValue){$chart.YAxis.MaxValue = $YMaxValue}
|
||||||
if ($YAxisNumberformat) {$chart.YAxis.Format = $YAxisNumberformat}
|
if ($YAxisNumberformat) {$chart.YAxis.Format = $YAxisNumberformat}
|
||||||
if ($chart.Datalabel -ne $null) {
|
if ($null -ne $chart.Datalabel) {
|
||||||
$chart.Datalabel.ShowCategory = [boolean]$ShowCategory
|
$chart.Datalabel.ShowCategory = [boolean]$ShowCategory
|
||||||
$chart.Datalabel.ShowPercent = [boolean]$ShowPercent
|
$chart.Datalabel.ShowPercent = [boolean]$ShowPercent
|
||||||
}
|
}
|
||||||
|
|
||||||
$chart.SetPosition($Row, $RowOffsetPixels, $Column, $ColumnOffsetPixels)
|
$chart.SetPosition($Row, $RowOffsetPixels, $Column, $ColumnOffsetPixels)
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
if ($VerticalAlignment) { $worksheet.row( $Row ).Style.VerticalAlignment = $VerticalAlignment }
|
if ($VerticalAlignment) { $worksheet.row( $Row ).Style.VerticalAlignment = $VerticalAlignment }
|
||||||
if ($Height) { $worksheet.row( $Row ).Height = $Height }
|
if ($Height) { $worksheet.row( $Row ).Height = $Height }
|
||||||
if ($FontColor) { $worksheet.row( $Row ).Style.Font.Color.SetColor( $FontColor ) }
|
if ($FontColor) { $worksheet.row( $Row ).Style.Font.Color.SetColor( $FontColor ) }
|
||||||
if ($BorderAround) { $worksheet.row( $Row ).Style.Border.BorderAround( $BorderAround ) }
|
if ($BorderAround) { $worksheet.row( $Row ).Style.Border.BorderAround( $BorderAround ) }
|
||||||
if ($BackgroundColor) {
|
if ($BackgroundColor) {
|
||||||
$worksheet.row( $Row ).Style.Fill.PatternType = $BackgroundPattern
|
$worksheet.row( $Row ).Style.Fill.PatternType = $BackgroundPattern
|
||||||
$worksheet.row( $Row ).Style.Fill.BackgroundColor.SetColor($BackgroundColor )
|
$worksheet.row( $Row ).Style.Fill.BackgroundColor.SetColor($BackgroundColor )
|
||||||
|
|||||||
2
ToDo.md
2
ToDo.md
@@ -7,3 +7,5 @@
|
|||||||
[ ] Copy parameter help from function Add-ExcelChart into New-ExcelChart.ps1
|
[ ] Copy parameter help from function Add-ExcelChart into New-ExcelChart.ps1
|
||||||
- [ ] Examples and tests for new "Quick charts" in Export Excel
|
- [ ] Examples and tests for new "Quick charts" in Export Excel
|
||||||
- [ ] Charting.ps1,GetXYRange.ps1, InferData.PS1 move to deprecated. (replace examples)
|
- [ ] Charting.ps1,GetXYRange.ps1, InferData.PS1 move to deprecated. (replace examples)
|
||||||
|
- [ ] Refactor Set-Row and Set-Column to use set-format and add conditional format support.
|
||||||
|
- [ ] Examples and tests for set-Row and Set-column; review test coverage and examples for Set-Format adn Add-Conditional formatting
|
||||||
Reference in New Issue
Block a user