From d8af9dc681aeb0b3810a6cba114a7eeedb3fd59f Mon Sep 17 00:00:00 2001 From: dfinke Date: Sun, 20 Dec 2015 20:27:16 -0500 Subject: [PATCH] Needs additional work --- Export-Excel.ps1 | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Export-Excel.ps1 b/Export-Excel.ps1 index 46406e1..329ae63 100644 --- a/Export-Excel.ps1 +++ b/Export-Excel.ps1 @@ -170,21 +170,21 @@ function Export-Excel { switch ($TargetData.$Name) { {$_ -is [datetime]} {$targetCell.Style.Numberformat.Format = "m/d/yy h:mm"} } - - [ref]$uriResult=$null - if ([uri]::TryCreate($cellValue, [System.UriKind]::Absolute, $uriResult)) { - $targetCell.Hyperlink = [uri]$cellValue + #[ref]$uriResult=$null + #if ([uri]::TryCreate($cellValue, [System.UriKind]::Absolute, $uriResult)) { - $namedStyle=$ws.Workbook.Styles.NamedStyles | where {$_.Name -eq 'HyperLink'} - if(!$namedStyle) { - $namedStyle=$ws.Workbook.Styles.CreateNamedStyle("HyperLink") - $namedStyle.Style.Font.UnderLine = $true - $namedStyle.Style.Font.Color.SetColor("Blue") - } + # $targetCell.Hyperlink = [uri]$cellValue - $targetCell.StyleName = "HyperLink" - } + # $namedStyle=$ws.Workbook.Styles.NamedStyles | where {$_.Name -eq 'HyperLink'} + # if(!$namedStyle) { + # $namedStyle=$ws.Workbook.Styles.CreateNamedStyle("HyperLink") + # $namedStyle.Style.Font.UnderLine = $true + # $namedStyle.Style.Font.Color.SetColor("Blue") + # } + + # $targetCell.StyleName = "HyperLink" + #} $ColumnIndex += 1 } @@ -308,11 +308,11 @@ function Export-Excel { $chart.SetSize($chartDef.Width, $chartDef.Height) $chartDefCount = @($chartDef.XRange).Count - if($chartDefCount -eq 1) { + if($chartDefCount -eq 1) { $Series=$chart.Series.Add($chartDef.YRange, $chartDef.XRange) $Series.Header = $chartDef.Header } else { - for($idx=0; $idx -lt $chartDefCount; $idx+=1) { + for($idx=0; $idx -lt $chartDefCount; $idx+=1) { $Series=$chart.Series.Add($chartDef.YRange[$idx], $chartDef.XRange) $Series.Header = $chartDef.Header[$idx] }