How to Permanently Save Only Filtered Excel Data to CSV
Question details
The user needs to export only the visible, filtered data in an Excel spreadsheet to a CSV file without including the hidden or excluded rows.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Exporting a specific subset of data to a CSV format after applying spreadsheet filters.
- Observed behavior
- Because CSV is a plain text format, it does not preserve Excel filters or manually hidden rows. Saving a filtered sheet directly to CSV often includes the excluded records in the final output file.
Before exporting your data, ensure your spreadsheet is accurately filtered and that you have saved a backup of your original workbook, as you will need to copy or delete data to create a clean CSV.
Copy Visible Rows to a New Workbook
The most reliable way to ensure hidden data is excluded from your CSV is to extract only the visible rows to a completely new file before saving.
Because CSV is a plain text format, it does not support native spreadsheet filtering or row-hiding features. To permanently remove excluded records in the final CSV, you must physically separate the filtered data from the hidden data.
Open your spreadsheet, highlight your data headers, and navigate to the Data tab to apply your desired filters to the dataset.
Select the entire filtered data range. Press Ctrl + C (or right-click and select Copy) to copy only the visible rows.
Open a completely new, blank workbook or worksheet. Press Ctrl + V to paste the filtered data.
Go to File > Save As, choose your destination folder, select 'CSV (Comma delimited) (*.csv)' from the file format drop-down menu, and click Save.

Delete Unwanted Rows Instead of Hiding Them
If you do not need to keep the original dataset intact, directly deleting the unwanted rows before saving is a quick alternative to filtering.
Easily Filter and Export CSVs with WPS Office
WPS Spreadsheet offers robust filtering, data management, and seamless CSV exporting capabilities. You can efficiently manage large datasets, extract exactly what you need, and save your work with full compatibility with Microsoft Excel formats.
- 1. Filter Data in WPS Spreadsheet: Open your data file in WPS Spreadsheet and use the Data > Filter tool to isolate the required records.
- 2. Extract the Records: Highlight the filtered data, copy it, and paste it into a brand-new worksheet to strip away hidden rows.
- 3. Export as CSV: Click Menu > Save As, select CSV from the file type dropdown, and click Save to generate your clean file.

Frequently Asked Questions
Why does my CSV file still show hidden rows?
CSV stands for Comma Separated Values. It is a plain text format that only stores raw text and numbers separated by commas. It cannot save spreadsheet states like hidden rows, cell colors, or active filters. If you hide rows and save as a CSV, the background text data is still written to the file.
How do I select only visible cells using keyboard shortcuts?
To ensure you are only selecting the visible data in a filtered list, highlight your entire data range and press Alt + ; (Alt and semicolon) on your keyboard. This isolates the visible cells, allowing you to copy and paste them without dragging along hidden data.
Can I use a macro to automate saving filtered data to CSV?
Yes. You can write a VBA macro that automatically applies a filter, copies the SpecialCells(xlCellTypeVisible) range, pastes it into a newly created workbook, saves that new workbook in a CSV format, and then closes it to streamline the process.




