Closed it-praktyk closed 7 years ago
Hi @it-praktyk , you should be able to override the table header style. If you want to override the defaults. The defaults are set here when the document is initialised. You should be able to do this:
Document TableHeadingExample {
## Example table
$summaryTable = [Ordered] @{
'Total Tests' = 43;
'Passed Tests' = 14;
'Failed Tests' = 11;
}
## Override the built-in styles so they are centered
Style -Name TableDefaultHeading -Size 11 -Color fff -Bold -BackgroundColor 4472c4 -Align Center
Style -Name TableDefaultRow -Size 11 -Align Center
Table -Hashtable $summaryTable
} | Export-Document -Format Html -PassThru | Invoke-Item
Hopefully that helps?!
Thank you.
I would like center a text in a table header.
The currently my table looks like below
The best answer for me (#lazymodeon) will be based on the code https://github.com/it-praktyk/Format-Pester/blob/devel/Format-Pester/Public/Format-Pester.ps1#L342-L373 .
Thank you.