directory renames

This commit is contained in:
jhoneill
2019-12-01 17:01:50 +00:00
parent 6b033d7451
commit 88e2a23e1b
108 changed files with 35 additions and 9 deletions

View File

@@ -0,0 +1,27 @@
function Get-ExcelWorkbookInfo {
[CmdletBinding()]
param (
[Alias('FullName')]
[Parameter(ValueFromPipelineByPropertyName=$true, ValueFromPipeline=$true, Mandatory=$true)]
[String]$Path
)
process {
try {
$Path = (Resolve-Path $Path).ProviderPath
$stream = New-Object -TypeName System.IO.FileStream -ArgumentList $Path,'Open','Read','ReadWrite'
$xl = New-Object -TypeName OfficeOpenXml.ExcelPackage -ArgumentList $stream
$workbook = $xl.Workbook
$workbook.Properties
$stream.Close()
$stream.Dispose()
$xl.Dispose()
$xl = $null
}
catch {
throw "Failed retrieving Excel workbook information for '$Path': $_"
}
}
}