Needs additional work

This commit is contained in:
dfinke
2015-12-20 20:27:16 -05:00
parent 4ea7f5d05b
commit d8af9dc681

View File

@@ -171,20 +171,20 @@ function Export-Excel {
{$_ -is [datetime]} {$targetCell.Style.Numberformat.Format = "m/d/yy h:mm"} {$_ -is [datetime]} {$targetCell.Style.Numberformat.Format = "m/d/yy h:mm"}
} }
[ref]$uriResult=$null #[ref]$uriResult=$null
if ([uri]::TryCreate($cellValue, [System.UriKind]::Absolute, $uriResult)) { #if ([uri]::TryCreate($cellValue, [System.UriKind]::Absolute, $uriResult)) {
$targetCell.Hyperlink = [uri]$cellValue # $targetCell.Hyperlink = [uri]$cellValue
$namedStyle=$ws.Workbook.Styles.NamedStyles | where {$_.Name -eq 'HyperLink'} # $namedStyle=$ws.Workbook.Styles.NamedStyles | where {$_.Name -eq 'HyperLink'}
if(!$namedStyle) { # if(!$namedStyle) {
$namedStyle=$ws.Workbook.Styles.CreateNamedStyle("HyperLink") # $namedStyle=$ws.Workbook.Styles.CreateNamedStyle("HyperLink")
$namedStyle.Style.Font.UnderLine = $true # $namedStyle.Style.Font.UnderLine = $true
$namedStyle.Style.Font.Color.SetColor("Blue") # $namedStyle.Style.Font.Color.SetColor("Blue")
} # }
$targetCell.StyleName = "HyperLink" # $targetCell.StyleName = "HyperLink"
} #}
$ColumnIndex += 1 $ColumnIndex += 1
} }