I’m trying to search an Excel column for specific text, I pass the workbook name, sheet number and column letter and the text I’m searching for but it is not found. I know the text I’m searching for is in the column, why is it not being found, what am i doing wrong?
$SearchText = 'I/O operation has been aborted'$File = 'C:\Iain\Empyrean\DBAReport\DBAReport_20200106_070005.xlsx'$Excel = New-Object -ComObject Excel.Application$Workbook = $Excel.Workbooks.Open($File)$workSheet = $Workbook.Sheets.Item(5)$Range = $Worksheet.Range("F1").EntireColumn$Range.Find($SearchText)
|1/4/2020 18:16||P01||Error||18210||MSSQL$PROD03||BackupIoRequest::ReportIoError: write failure on backup device '//P03/SQLBackups/PROD03/csprod/P03_PROD03_csprod_Full_202001041721.safe'. Operating system error 995(The I/O operation has been aborted because of either a thread exit or an application request.).|