Add -NoHeader parameter to ConvertTo-Csv and Export-Csv cmdlets#19108
Add -NoHeader parameter to ConvertTo-Csv and Export-Csv cmdlets#19108iSazonov merged 8 commits intoPowerShell:masterfrom
-NoHeader parameter to ConvertTo-Csv and Export-Csv cmdlets#19108Conversation
iSazonov
left a comment
There was a problem hiding this comment.
LGTM with minor comments.
test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Csv.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Csv.Tests.ps1
Outdated
Show resolved
Hide resolved
bb44693 to
0843a77
Compare
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
@ArmaanMcleod Please open new issue in Docs repository and add reference in the PR description (where |
@iSazonov Done 🙂 |
|
@ArmaanMcleod Thanks for your contribution! |
|
🎉 Handy links: |
PR Summary
Fixes #17527
Added
-NoHeadertoConvertTo-CsvandExport-Csvcmdlets.PR Context
Currently we have no easy way to export a CSV file without headers, but we have the ability to import CSV files with headers using
Import-Csv -Header.This change allows
ConvertTo-CsvandExport-Csvto export without headers. This simplifies scenarios where the user may not care about headers and removes need to manipulate the CSV to achieve a header less CSV.So instead of always having to skip the first row when writing to CSV:
You can now convert to CSV without headers using
ConvertTo-Csv -NoHeader:You can also choose to export without headers using
Export-Csv -NoHeader:Or import first, manipulate pipeline object to something else, then export again with no headers:
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.-NoHeaderparameter inConvertTo-CsvandExport-CsvUtility Cmdlets MicrosoftDocs/PowerShell-Docs#9809(which runs in a different PS Host).