Skip to content

How do you toggle row counts on tables? #1295

Answered by ninmonkey
ninmonkey asked this question in Q&A
Discussion options

You must be logged in to vote

That got me there. here's a version without a commandlet

[OfficeOpenXml.ExcelPackage]$pkg2 = Open-ExcelPackage $Path.Dest
[OfficeOpenXml.Table.ExcelTable]$table1 = $pkg2.Sheet1.Tables[0]
$rowFunc = [OfficeOpenXml.Table.RowFunctions]

$table1.Columns[0].TotalsRowFunction = $rowFunc::Count
$table1.Columns[2].TotalsRowFunction = $rowFunc::Average

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dfinke
Comment options

Answer selected by dfinke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants