Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Format-Table (and Format-List) should have a -FormatString parameter.  #17544

Copy link
Copy link
@jhoneill

Description

@jhoneill
Issue body actions

Summary of the new feature / enhancement

Sending some data through format table I see this

Product         Birmingham          Cardiff        Edinburgh          Glasgow           London
-------         ----------          -------        ---------          -------           ------
Asparagus             26.5               26 26.6666666666667 28.1666666666667 27.3333333333333
Cucumber  27.6666666666667 27.3333333333333             33.5 21.1666666666667 28.3333333333333
Lettuce   29.6666666666667             23.5 35.1666666666667 25.1666666666667 35.1666666666667
Potato                21.5 26.1666666666667 24.3333333333333             24.5               30
Tomato    32.3333333333333               32 28.8333333333333 29.1666666666667             26.5

Using custom properties I can specify a format string for each column. But that needs to be done 5 times - and may places of decimals limit the number of columns that can be fitted in.

In an ideal world we would have <blah> | format-table * -FormatString "0.00"

Proposed technical implementation details (optional)

No response

Hrxn

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.