Refactored

This commit is contained in:
dfinke
2019-09-22 11:58:13 -04:00
parent e45c07c40b
commit 9e92f2dbc6
3 changed files with 76 additions and 59 deletions

View File

@@ -0,0 +1,19 @@
# Get-ExcelSheets
param(
[Parameter(Mandatory)]
$path
)
$hash = @{ }
$e = Open-ExcelPackage $path
foreach ($sheet in $e.workbook.worksheets) {
$hash[$sheet.name] = Import-Excel -ExcelPackage $e -WorksheetName $sheet.name
}
Close-ExcelPackage $e -NoSave
$hash