From f0ec5f4a96ca31b242123f86d1aaacc7b7e67304 Mon Sep 17 00:00:00 2001 From: Justin Grote Date: Fri, 14 Feb 2020 14:49:07 -0800 Subject: [PATCH] Remove Write-Debug Performance Outputs These outputs are unnecessary and can confuse someone observing other debug output. --- Public/Import-Excel.ps1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Public/Import-Excel.ps1 b/Public/Import-Excel.ps1 index 11a856b..8b2fbb0 100644 --- a/Public/Import-Excel.ps1 +++ b/Public/Import-Excel.ps1 @@ -117,7 +117,6 @@ throw "Worksheet '$WorksheetName' not found, the workbook only contains the worksheets '$($ExcelPackage.Workbook.Worksheets)'. If you only wish to select the first worksheet, please remove the '-WorksheetName' parameter." ; return } - Write-Debug $sw.Elapsed.TotalMilliseconds #region Get rows and columns #If we are doing dataonly it is quicker to work out which rows to ignore before processing the cells. if (-not $EndRow ) { $EndRow = $Worksheet.Dimension.End.Row } @@ -154,7 +153,6 @@ throw "Duplicate column headers found on row '$StartRow' in columns '$($Duplicates.Group.Column)'. Column headers must be unique, if this is not a requirement please use the '-NoHeader' or '-HeaderName' parameter."; return } #endregion - Write-Debug $sw.Elapsed.TotalMilliseconds if (-not $Rows) { Write-Warning "Worksheet '$WorksheetName' in workbook '$Path' contains no data in the rows after top row '$StartRow'" } @@ -191,7 +189,6 @@ } #endregion } - Write-Debug $sw.Elapsed.TotalMilliseconds } catch { throw "Failed importing the Excel workbook '$Path' with worksheet '$Worksheetname': $_"; return } finally { @@ -199,4 +196,4 @@ } } } -} \ No newline at end of file +}