mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-01-03 17:13:17 +00:00
Added custom formula for totals row + Example File
This commit is contained in:
15
Examples/Tables/TotalsRow.ps1
Normal file
15
Examples/Tables/TotalsRow.ps1
Normal 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
|
||||
Reference in New Issue
Block a user