mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-15 07:43:23 +00:00
Added ValidateScript block to Path parameter for Import-Excel
This commit is contained in:
@@ -29,6 +29,7 @@ function Import-Excel {
|
|||||||
param(
|
param(
|
||||||
[Alias("FullName")]
|
[Alias("FullName")]
|
||||||
[Parameter(ValueFromPipelineByPropertyName=$true, ValueFromPipeline=$true, Mandatory=$true)]
|
[Parameter(ValueFromPipelineByPropertyName=$true, ValueFromPipeline=$true, Mandatory=$true)]
|
||||||
|
[ValidateScript({ Test-Path $_ -PathType Leaf })]
|
||||||
$Path,
|
$Path,
|
||||||
[Alias("Sheet")]
|
[Alias("Sheet")]
|
||||||
$WorkSheetname=1,
|
$WorkSheetname=1,
|
||||||
|
|||||||
Reference in New Issue
Block a user