Skip to content
Discussion options

You must be logged in to vote

Thanks for using ImportExcel.

You are not piping your data to Export-Excel.

Try this. I would also recommend not using NoHeader. Needed for the Autofilter to work best.

$cheminFichierDestination = "C:\Users\pmill755\desktop\report.xlsx"
Remove-Item $cheminFichierDestination -ErrorAction SilentlyContinue

$data = $(
    Import-Excel "C:\Users\pmill755\desktop\toto.xlsx"
    Import-Excel "C:\Users\pmill755\desktop\tata.xlsx"
)

$data | Export-Excel -Path $cheminFichierDestination -WorksheetName "Feuil1" -AutoSize -TableName "Donnees" -AutoFilter -Show

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@pmill06e
Comment options

@pmill06e
Comment options

@dfinke
Comment options

@pmill06e
Comment options

Answer selected by pmill06e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants