Closed tpcarman closed 4 years ago
@tpcarman I have been working on this to see what's logical - without breaking existing functionality. So far I have this:
param (
[System.String[]] $Format = 'Html',
[System.String] $Path = '~\Desktop',
[System.Management.Automation.SwitchParameter] $PassThru
)
Import-Module PScribo -Force;
$example33 = Document -Name 'PScribo Example 33' {
Style -Name Normal -Size 11 -Color 000 -Font 'Segoe UI','Helvetica','Arial','sans-serif'
Style -Name GithubTableHeading -Size 12 -Bold
Style -Name GithubTableRow -Size 12
Style -Name GithubTableAltRow -Size 12 -BackgroundColor f6f8fa
TableStyle GithubTable -BorderWidth 1 -BorderColor dfe2e5 -HeaderStyle GithubTableHeading -RowStyle GithubTableRow -AlternateRowStyle GithubTableAltRow -PaddingTop 5 -PaddingLeft 10 -PaddingBottom 5 -PaddingRight 10
$exampleObjects = @(
[PSCustomObject] @{ Name = 'DC1'; Hostname = 'DC1SYS1'; 'IP Address' = '192.168.1.10'; 'Subnet Mask' = '255.255.255.0'; }
[PSCustomObject] @{ Name = 'DC2'; Hostname = 'DC2SYS1'; 'IP Address' = '192.168.1.11'; 'Subnet Mask' = '255.255.255.0'; }
)
Table -InputObject $exampleObjects -Style GithubTable -List -Combine 'Name' -Width 0
}
$example33 | Export-Document -Path $Path -Format $Format -PassThru:$PassThru
I only have HTML output working and it (currently) renders like this:
Does this a) work for you and b) can you think of an alternative to -Combine '<property>'
?
@tpcarman This functionality is now available in the dev branch. Can you take it for a spin and let me know whether you see any issues? Thanks, Iain
Available in the 0.8.0 release
It would be great if List tables had support for multiple columns to be able to present data as per below.