mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
19 lines
280 B
PowerShell
19 lines
280 B
PowerShell
# 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 |