Better parameter sets for merge. Fixed bug with setting font name.

This commit is contained in:
jhoneill
2018-10-08 21:35:19 +01:00
parent 91a7c17341
commit 3835ceeebb
5 changed files with 141 additions and 123 deletions

View File

@@ -23,7 +23,7 @@
Set-ExcelColumn -Worksheet $ws -Heading "Link" -Value {"https://en.wikipedia.org" + $worksheet.cells["B$Row"].value } -AutoSize
In this example, the worksheet in $ws has partial links to wikipedia pages in column B.
The -Value parameter is is a script block and it outputs a string which begins https... and ends with the value of cell at
The -Value parameter is is a script block and it outputs a string which begins https... and ends with the value of cell at
column B in the current row. When given a valid URI, Set-ExcelColumn makes it a hyperlink. The column will be autosized to fit the links.
.EXAMPLE
4..6 | Set-ExcelColumn -Worksheet $ws -AutoNameRange
@@ -163,7 +163,7 @@
#region Apply formatting
$params = @{}
foreach ($p in @('Underline','Bold','Italic','StrikeThru','FontSize','FontShift','NumberFormat','TextRotation',
foreach ($p in @('Underline','Bold','Italic','StrikeThru', 'FontName', 'FontSize','FontShift','NumberFormat','TextRotation',
'WrapText', 'HorizontalAlignment','VerticalAlignment', 'Autosize', 'Width', 'FontColor'
'BorderAround', 'BackgroundColor', 'BackgroundPattern', 'PatternColor')) {
if ($PSBoundParameters.ContainsKey($p)) {$params[$p] = $PSBoundParameters[$p]}