Cmdlets for Microsoft Excel

Build 24.0.9060

Remove-Excel Cmdlet

Parameters   Output Objects  

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

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060