EvotecIT / PSWriteHTML

PSWriteHTML is PowerShell Module to generate beautiful HTML reports, pages, emails without any knowledge of HTML, CSS or JavaScript. To get started basics PowerShell knowledge is required.
MIT License
826 stars 106 forks source link

Buttons on DataTable do not work in Chrome, only MS Edge #312

Closed raoue closed 2 years ago

raoue commented 2 years ago

Buttons that Work

csvHtml5, excelHtml5, pdfHtml5 only work in MS Edge and NOT in Chrome. Searchbuilder and CopyText buttons work in either browser.

Environment

PSWriteHTML version 0.0.170 PowerShell 5

Code:

`Import-Module -Name "C:\Program Files\WindowsPowerShell\Modules\PSWriteHTML\0.0.170\PSWriteHTML.psm1" $hHTMLParams = @{ Name = "Test - Processes" Author = "rouellette@firstcanadian.ca" FilePath = Join-Path -Path $PSScriptRoot -ChildPath "Output\Test-Processes.html" HtmlData = { New-HTMLTab -Name 'Processes' -TextSize 20 -Heading "Test Processes" { New-HTMLTable -Buttons copyHtml5, csvHtml5, excelHtml5, pdfHtml5, searchBuilder -DataTable (Get-Process | Select-Object -First 5) } } }

New-HTML @hHTMLParams`

PrzemyslawKlys commented 2 years ago

Press F12 and see if you're getting any errors. In my chrome it works.

raoue commented 2 years ago

F12 Results:

DevTools failed to load source map: Could not load content for file://fcic-prof/Profiles$/r.ouellette/My%20Documents/Powershell%20Scripts/Dashboard/Output/moment.min.js.map: System error: net::ERR_FILE_NOT_FOUND

DevTools failed to load source map: Could not load content for file://fcic-prof/Profiles$/r.ouellette/My%20Documents/Powershell%20Scripts/Dashboard/Output/pdfmake.min.js.map: System error: net::ERR_FILE_NOT_FOUND

raoue commented 2 years ago

Don't those files get inserted into the resultant HTML?

raoue commented 2 years ago

If -Online NOT specified?

PrzemyslawKlys commented 2 years ago

map problems are not a problem and are not needed. if no other errors export to excel, csv should work. Which chrome?

raoue commented 2 years ago

Sorry about that, I noticed it required an Updated, performed update, now it's working. I apologize for wasting your time.