Standardising examples

This commit is contained in:
MikeyBronowski
2020-07-01 22:04:37 +02:00
parent 0a77a83e35
commit 8a20963577
50 changed files with 249 additions and 154 deletions

View File

@@ -1,8 +1,9 @@
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$xlFile = "$env:TEMP\mw.xlsx"
Remove-Item $xlFile -ErrorAction Ignore
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$leftCsv = @"
MyProp1,MyProp2,Length
@@ -16,4 +17,4 @@ a,b,10
c,d,21
"@ | ConvertFrom-Csv
Merge-Worksheet -OutputFile $xlFile -ReferenceObject $leftCsv -DifferenceObject $rightCsv -Key Length -Show
Merge-Worksheet -OutputFile $xlSourcefile -ReferenceObject $leftCsv -DifferenceObject $rightCsv -Key Length -Show

View File

@@ -1,3 +1,5 @@
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
Remove-Item -Path "$env:temp\server*.xlsx" , "$env:temp\Combined*.xlsx" -ErrorAction SilentlyContinue
#Get a subset of services into $s and export them

View File

@@ -1,3 +1,5 @@
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
Remove-Item -Path "$env:temp\server*.xlsx" , "$env:temp\Combined*.xlsx" -ErrorAction SilentlyContinue
#Get a subset of services into $s and export them