diff --git a/source/Public/Remove-RowsWithEmptyCSVStatus.ps1 b/source/Public/Remove-RowsWithEmptyCSVStatus.ps1 index 7258500..0e4f38e 100644 --- a/source/Public/Remove-RowsWithEmptyCSVStatus.ps1 +++ b/source/Public/Remove-RowsWithEmptyCSVStatus.ps1 @@ -1,3 +1,18 @@ +<# + .SYNOPSIS + Removes rows from an Excel worksheet where the 'CSV_Status' column is empty and saves the result to a new file. + .DESCRIPTION + The Remove-RowsWithEmptyCSVStatus function imports data from a specified worksheet in an Excel file, checks for the presence of the 'CSV_Status' column, and filters out rows where the 'CSV_Status' column is empty. The filtered data is then exported to a new Excel file with a '-Filtered' suffix added to the original file name. + .PARAMETER FilePath + The path to the Excel file to be processed. + .PARAMETER WorksheetName + The name of the worksheet within the Excel file to be processed. + .EXAMPLE + PS C:\> Remove-RowsWithEmptyCSVStatus -FilePath "C:\Reports\Report.xlsx" -WorksheetName "Sheet1" + This command imports data from the "Sheet1" worksheet in the "Report.xlsx" file, removes rows where the 'CSV_Status' column is empty, and saves the filtered data to a new file named "Report-Filtered.xlsx" in the same directory. + .NOTES + This function requires the ImportExcel module to be installed. +#> function Remove-RowsWithEmptyCSVStatus { [CmdletBinding()] param (