mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Linted with the updated PSScriptAnalyzer.
This commit is contained in:
@@ -2,19 +2,19 @@
|
||||
function Import-Html {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
$url,
|
||||
$url,
|
||||
$index,
|
||||
$Header,
|
||||
[int]$FirstDataRow=0,
|
||||
[Switch]$UseDefaultCredentials
|
||||
)
|
||||
|
||||
|
||||
$xlFile = [System.IO.Path]::GetTempFileName() -replace "tmp","xlsx"
|
||||
rm $xlFile -ErrorAction Ignore
|
||||
Remove-Item $xlFile -ErrorAction Ignore
|
||||
|
||||
Write-Verbose "Exporting to Excel file $($xlFile)"
|
||||
|
||||
$data = Get-HtmlTable -url $url -tableIndex $index -Header $Header -FirstDataRow $FirstDataRow -UseDefaultCredentials: $UseDefaultCredentials
|
||||
|
||||
|
||||
$data | Export-Excel $xlFile -Show -AutoSize
|
||||
}
|
||||
Reference in New Issue
Block a user