From 4bd3efa1ef4dd2e8ffe5b894de5b23a1f3f4828e Mon Sep 17 00:00:00 2001 From: Stephen Brown <72806262+steve-daedilus@users.noreply.github.com> Date: Fri, 14 Oct 2022 19:00:42 +0100 Subject: [PATCH] Set Validate Range for rows to max rows available $StartRow parameter had ValidateRange(1,9999) which was limiting the start row to a maximum of 9999. There's no good reason this cannot be any row in the spreadsheet, of which the maximum is 1048576 in modern instances of Excel. --- Public/Import-Excel.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Public/Import-Excel.ps1 b/Public/Import-Excel.ps1 index b4fe004..3734f2b 100644 --- a/Public/Import-Excel.ps1 +++ b/Public/Import-Excel.ps1 @@ -23,7 +23,7 @@ [Parameter(ParameterSetName = 'PackageC', Mandatory)] [Switch]$NoHeader , [Alias('HeaderRow', 'TopRow')] - [ValidateRange(1, 9999)] + [ValidateRange(1, 1048576)] [Int]$StartRow = 1, [Alias('StopRow', 'BottomRow')] [Int]$EndRow ,