You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Powershell to pull datetime values in Excel and next the script generates a PivotTable for each table.
(using the dfinke/ImportExcel module).
To format cells in hh:mm:ss format, I use PSExcel module.
For the plain tables the format works fine.
But the data in the PivotTables are not formatted as requested...
I'm using Powershell to pull datetime values in Excel and next the script generates a PivotTable for each table.
(using the dfinke/ImportExcel module).
To format cells in hh:mm:ss format, I use PSExcel module.
For the plain tables the format works fine.
But the data in the PivotTables are not formatted as requested...
Format Data Worksheet
$Sheetnames = 'Min', 'Max', 'Average', 'Errors', 'ErrorTypes'
foreach ($sheet in $Sheetnames)
{
$Worksheet = $Excel | Get-Worksheet -Name $sheet
$Worksheet | Format-Cell -StartColumn 4 -EndColumn 4 -Autofit -NumberFormat 'hh:mm:ss'
}
Format Pivot Worksheet
$Sheetnames = 'MinPivotTable', 'MaxPivotTable', 'AveragePivotTable'
foreach ($sheet in $Sheetnames)
{
$Worksheet = $Excel | Get-Worksheet -Name $sheet
$Worksheet | Format-Cell -StartColumn 2 -EndColumn 8 -Autofit -NumberFormat 'hh:mm:ss'
Any suggestion how to get this working?
The text was updated successfully, but these errors were encountered: