-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Spreadsheet with data above StartRow causes column headers to be duplicated #1587
Comments
@dbrennand Thanks for using the Excel module. My guess is the logic when using No ETA on this. |
I did not dig enough deep but inserting expression |
Thanks @scriptingstudio for checking that. I'll put this on the list. Need to see if there are tests, doubt it. |
@scriptingstudio @dfinke - Pushed a fix for this in master...dbrennand:ImportExcel:fix/#1587 With this change the expected warning is now showing: Import-Excel -Path "Issue.xlsx" -WorksheetName "Sheet1" -StartRow 3
WARNING: Worksheet 'Sheet1' in workbook 'Issue.xlsx' contains no data in the rows after top row '3' Previous behaviour is also preserved: Import-Excel -Path "Issue.xlsx" -WorksheetName "Sheet1 (2)"
WARNING: Worksheet 'Sheet1 (2)' in workbook 'Issue.xlsx' contains no data in the rows after top row '1' |
Thanks @dbrennand! I just created a branch to take a look. Were you able to take a look at the tests to see if there were any that tested this code? |
There are a couple of tests which already include |
It needs additional tests. |
Hey @dfinke
Hope you're keeping well 🙂
I've noticed some odd behaviour using
Import-Excel ... -StartRow 3
with an Excel spreadsheet which has the following layout:Sheet1
There are no rows containing data after the table headers however, when I import this spreadsheet it produces the following output:
Sheet1 (2)
This is working as expected and the warning is shown:
I think this issue is related to there being some data above the
StartRow 3
and the logic in thiselse
statement of theImport-Excel
cmdlet doesn't account for this case?This issue occurs on the latest module version:
The text was updated successfully, but these errors were encountered: