mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-22 19:23:24 +00:00
Wasn't removing force from Param to passed thru
This commit is contained in:
@@ -180,7 +180,7 @@
|
|||||||
#if force was specified export even if there are no rows. If there are no columns, the query failed and export "null" if forced
|
#if force was specified export even if there are no rows. If there are no columns, the query failed and export "null" if forced
|
||||||
if ($Force -or $DataTable.Rows.Count) {
|
if ($Force -or $DataTable.Rows.Count) {
|
||||||
#Call export-excel removing parameters which relate to the SQL query, and keeping the rest.
|
#Call export-excel removing parameters which relate to the SQL query, and keeping the rest.
|
||||||
'Connection' , 'Database' , 'Session' , 'MsSQLserver' , 'SQL' , 'DataTable' , 'QueryTimeout' |
|
'Connection' , 'Database' , 'Session' , 'MsSQLserver' , 'SQL' , 'DataTable' , 'QueryTimeout' , 'Force' |
|
||||||
ForEach-Object {$null = $PSBoundParameters.Remove($_) }
|
ForEach-Object {$null = $PSBoundParameters.Remove($_) }
|
||||||
if ($DataTable.Columns.Count) { Export-Excel @PSBoundParameters -InputObject $DataTable }
|
if ($DataTable.Columns.Count) { Export-Excel @PSBoundParameters -InputObject $DataTable }
|
||||||
else { Export-Excel @PSBoundParameters -InputObject $null }
|
else { Export-Excel @PSBoundParameters -InputObject $null }
|
||||||
|
|||||||
Reference in New Issue
Block a user