Export only visible rows to CSV with Powershell
问题 I have logic in an Excel macro that parses the documents and hides rows that don't have data in certain cells per row. Looking to export only the visible cells to CSV. I have code (below) to export everything, but how do I make it only do visible rows? $oWorksheet = $objExcel.Worksheets.item(6) $oWorksheet.Activate() "saving $filecsv" $oWorksheet.SaveAs($filecsv,[Microsoft.Office.Interop.Excel.XlFileFormat]::xlCSVWindows) $workbook.Saved = $true 回答1: Please see this answer I believe you could