TitleBackgroundColor parameter of Export-Excel cmdlet

Welcome Forums General PowerShell Q&A TitleBackgroundColor parameter of Export-Excel cmdlet

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
3 months, 3 weeks ago.

  • Author
    Posts
  • #109963

    Participant
    Points: 195
    Rank: Participant

    I'm trying to "beautify" a nearly final product which is a simple EXCEL spreadsheet. The Export-Excel cmdlet serves me well for this purpose, but this cmdlet, which is full of parameters (some fancy ones include conditional formatting), is very poorly documented.  For example, what possible values are there for setting the TitleBackgroundColor parameter? Another parameter, TitleFillPattern has all its possible settings built into the Powershell editor so that immediately after the space of typing: TitleFillPattern, these choices (e.g., Light Gray) pop up.  But the rest, which have to do with Excel cell properties, are nowhere to be found.  Would be grateful for references to where these values/settings can be obtained or are documented.

    Many thanks.

  • #109982

    Participant
    Points: 350
    Helping Hand
    Rank: Contributor

    The easiest approach is to open the XLSX, start a macro, set the color you want and review the VBA code generated to provide hints. Excel is using a old COM platform and it's difficult to navigate, which is why there are PS Modules trying to make it easier.

    • #109988

      Participant
      Points: 195
      Rank: Participant

      Great idea Mr Simmers!  Much thanks for your creative solution.

       

The topic ‘TitleBackgroundColor parameter of Export-Excel cmdlet’ is closed to new replies.