Call .NET for temp files

This commit is contained in:
dfinke
2016-02-24 11:06:48 -05:00
parent ca2b4c790f
commit 2ff98d1de5
4 changed files with 4 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ function DoChart {
-NoLegend:$NoLegend -ShowCategory:$ShowCategory -ShowPercent:$ShowPercent
}
$xlFile = (New-TemporaryFile).fullname -replace "tmp","xlsx"
$xlFile = [System.IO.Path]::GetTempFileName() -replace "tmp","xlsx"
$targetData | Export-Excel $xlFile -ExcelChartDefinition $chart -Show -AutoSize
}

View File

@@ -5,7 +5,7 @@ function Get-HtmlTable {
$tableIndex=0
)
$r = (Invoke-WebRequest $url)
$r = Invoke-WebRequest $url
$table = $r.ParsedHtml.getElementsByTagName("table")[$tableIndex]
$propertyNames = @()
$totalRows=@($table.rows).count-1

View File

@@ -5,7 +5,7 @@ function Import-Html {
$index
)
$xlFile = (New-TemporaryFile).fullname -replace "tmp","xlsx"
$xlFile = [System.IO.Path]::GetTempFileName() -replace "tmp","xlsx"
rm $xlFile -ErrorAction Ignore
Write-Verbose "Exporting to Excel file $($xlFile)"

View File

@@ -4,7 +4,7 @@
RootModule = 'ImportExcel.psm1'
# Version number of this module.
ModuleVersion = '2.1'
ModuleVersion = '2.1.0'
# ID used to uniquely identify this module
GUID = '60dd4136-feff-401a-ba27-a84458c57ede'