Identify last row in a worksheet and retrieve just that row #1271
Replies: 2 comments
-
|
OK, found I could do it this way, but there's an arbitrary limit. $lastRow = Import-Excel -Path $xlFile -WorksheetName "Sheet1" -StartRow $xlFile.Sheet1.Dimension.Rows -EndRow $xlFile.Sheet1.Dimension.Rows -NoHeaderLimit is 9999, and found this limit set in Public\Import-Excel.ps1 at Line 26. Locally I've added some extra 9's to the upper range, and this then works instantly. @dfinke How am I best to sort out a change to this / pull request? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Moved to issues #1272 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Is there an easier / more efficient way to identify the last row with data in a sheet and retrieve that last row (or even cell) without retrieving the rest of the data?
Currently doing the following, however with over 100k rows, this is pretty slow. Changed identifiable variables / names etc, otherwise the same.
I found I could catch the number of rows by the following:
I'm clearly overlooking how I can leverage this to avoid reading everything out of the sheet. Any pointers?
Beta Was this translation helpful? Give feedback.
All reactions