Skip to content

Possible regression on Import-Excel skips the first row when Headers specified #712

@AikenBM

Description

@AikenBM

I'm not sure if this should be reported as a new issue or if I should be commenting on the closed issue, but I'm getting the same behavior reported in #417 and #427.

If I have an Excel worksheet that looks like this:

A B C
1 a b c
2 d e f

And I execute this:

Import-Excel Book1.xlsx -HeaderName 'Q','R','S'

I get this output:

Q R S
- - -
d e f

Specifying -StartRow 1 does not change the output.

I expect to get this output:

Q R S
- - -
a b c
d e f

If I use the -NoHeader switch instead, I get this:

P1 P2 P3
-- -- --
a  b  c
d  e  f

if I change my spreadsheet to this:

A B C
1
2 a b c
3 d e f

Then I get this output:

Q R S
- - -
a b c
d e f

I'm using ImportExcel 6.5.1 on PowerShell 6.2.3 and PowerShell 5.1 on Windows 10 x64 Enterprise 1809. I have tried force uninstalling ImportExcel and then downloading and reinstalling it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions