Remove-Excel Cmdlet
Deletes Microsoft Excel data.
Syntax
Remove-Excel [parameters]
Remarks
The Remove-Excel cmdlet allows you to use a syntax similar to SQL DELETE statements to delete Microsoft Excel data.
$conn = Connect-Excel -ExcelFile 'C:\MyExcelWorkbooks\SampleWorkbook.xlsx' Remove-Excel -Connection $conn -Table "Sheet" -Id "5"The Where parameter can also be used to specify the primary key:
Remove-Excel -Connection $conn -Table "exTablePowershell;" -Where "RowId = 5"The primary key can also be passed to the cmdlet along the pipeline:
Select-Excel -Connection $conn -Table Sheet -Where "FirstName = 'Bob'" | Remove-Excel