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
great project! Just one issue occured to us during importing the Excel export into MSSQL. There are empty Excel worksheets for for reporting regions, where no events happened. Changing the following code in "PSWinReportingHelper.ps1"
Makes sense. Will incorporate. Although in some cases it may be useful to know there were no events. Maybe a switch in config. Or maybe direct write to sql should be added :-) You know you can always do pull requests...
Hi @PrzemyslawKlys ,
great project! Just one issue occured to us during importing the Excel export into MSSQL. There are empty Excel worksheets for for reporting regions, where no events happened. Changing the following code in "PSWinReportingHelper.ps1"
function Export-ReportToXLSX ($Report, $ReportOptions, $ReportFilePath, $ReportName, $ReportTable) { if ($Report -eq $true) { $ReportTable | Export-Excel -Path $ReportFilePath -WorkSheetname $ReportName -AutoSize -FreezeTopRow -AutoFilter return } else { return } }
to
function Export-ReportToXLSX ($Report, $ReportOptions, $ReportFilePath, $ReportName, $ReportTable) { if (($Report -eq $true) -and ($($ReportTable | Measure-Object).Count -gt 0)) { $ReportTable | Export-Excel -Path $ReportFilePath -WorkSheetname $ReportName -AutoSize -FreezeTopRow -AutoFilter return } else { return } }
got rid of the empty worksheets. Maybe this can be added to the next version?
Kind Regards
Robert
The text was updated successfully, but these errors were encountered: