Added custom formula for totals row + Example File

This commit is contained in:
Thomas Hofkens
2022-11-09 11:35:19 +01:00
parent dcb67b4518
commit f494635b48
3 changed files with 49 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$r = Get-ChildItem C:\WINDOWS\system32 -File
$TotalSettings = @{
Length = "Sum"
Name = "Count"
Extension = @{
# You can create the formula in an Excel workbook first and copy-paste it here
# This syntax can only be used for the Custom type
Custom = "=COUNTIF([Extension];`".exe`")"
}
}
$r | Export-Excel -TableName system32files -TableStyle Medium10 -TotalSettings $TotalSettings -Show