diff --git a/Get-ExcelSheetInfo.ps1 b/Get-ExcelSheetInfo.ps1 index 90339bd..e60e9e5 100644 --- a/Get-ExcelSheetInfo.ps1 +++ b/Get-ExcelSheetInfo.ps1 @@ -1,16 +1,16 @@ Function Get-ExcelSheetInfo { - <# - .SYNOPSIS + <# + .SYNOPSIS Get worksheet names and their indices of an Excel workbook. - - .DESCRIPTION + + .DESCRIPTION The Get-ExcelSheetInfo cmdlet gets worksheet names and their indices of an Excel workbook. - - .PARAMETER Path + + .PARAMETER Path Specifies the path to the Excel file. This parameter is required. - + .EXAMPLE - Get-ExcelSheetInfo .\Test.xlsx + Get-ExcelSheetInfo .\Test.xlsx .NOTES CHANGELOG @@ -19,8 +19,8 @@ Function Get-ExcelSheetInfo { .LINK https://github.com/dfinke/ImportExcel - #> - + #> + [CmdletBinding()] param( [Alias("FullName")] @@ -28,13 +28,13 @@ Function Get-ExcelSheetInfo { $Path ) process { - $Path = (Resolve-Path $Path).Path + $Path = (Resolve-Path $Path).ProviderPath write-debug "target excel file $Path" $stream = New-Object -TypeName System.IO.FileStream -ArgumentList $Path,"Open","Read","ReadWrite" $xl = New-Object -TypeName OfficeOpenXml.ExcelPackage -ArgumentList $stream $workbook = $xl.Workbook if($workbook -and $workbook.Worksheets) { - $workbook.Worksheets | + $workbook.Worksheets | Select-Object -Property name,index,hidden,@{ Label = "Path" Expression = {$Path} diff --git a/ImportExcel.psd1 b/ImportExcel.psd1 index 1f9d0c8..73be440 100644 --- a/ImportExcel.psd1 +++ b/ImportExcel.psd1 @@ -4,7 +4,7 @@ RootModule = 'ImportExcel.psm1' # Version number of this module. -ModuleVersion = '2.2.6' +ModuleVersion = '2.2.7' # ID used to uniquely identify this module GUID = '60dd4136-feff-401a-ba27-a84458c57ede' diff --git a/README.md b/README.md index c53cfac..37f21a1 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ iex (new-object System.Net.WebClient).DownloadString('https://raw.github.com/dfi # What's new #### 7/1/2016 +* Pushed 2.2.7 fixed resolve path in Get-ExcelSheetInfo * Fixed [Casting Error in Export-Excel](https://github.com/dfinke/ImportExcel/issues/108) * For `Import-Excel` change Resolve-Path to return ProviderPath for use with UNC