mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-01-07 19:13:43 +00:00
Replace " | Out-Null" with "$null = " doble performance on DataTable
This commit is contained in:
@@ -625,7 +625,7 @@
|
||||
if it was passed it is a data table don't do foreach on it (slow) put the whole table in and set dates on date columns,
|
||||
set things up for the end block, and skip the process block #>
|
||||
if ($InputObject -is [System.Data.DataTable]) {
|
||||
$ws.Cells[$row,$StartColumn].LoadFromDataTable($InputObject, (-not $noHeader) ) | Out-Null
|
||||
$null = $ws.Cells[$row,$StartColumn].LoadFromDataTable($InputObject, (-not $noHeader) )
|
||||
foreach ($c in $InputObject.Columns.where({$_.datatype -eq [datetime]})) {
|
||||
Set-ExcelColumn -Worksheet $ws -Column ($c.Ordinal + $StartColumn) -NumberFormat 'Date-Time'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user