Save Specific Excel Columns to CSV: How-To
To save only specific columns of an Excel worksheet to a CSV file, you first hide or copy the columns you want, then use the standard Save As CSV option. This article explains the exact steps for both Windows and Mac, how to handle multiple sheets, and what to do when your data contains commas or special characters.
Why You Might Need Only Certain Columns
CSV (comma-separated values) files are plain text files used to exchange data between spreadsheet programs, databases, and web applications. Unlike Excel’s native .xlsx format, a CSV file does not store formatting, formulas, or multiple sheets—it only holds the raw values in a single table. When you export an entire worksheet to CSV, every column in that sheet is included. If you only need a few columns for a mail merge, a data import, or a report, you must first reduce the worksheet to just those columns.
Method 1: Hide the Unwanted Columns (Simplest)
Hiding columns is the quickest approach because it does not create a copy of your data. The CSV export will only include visible columns.
- Open the Excel workbook and select the worksheet that contains the data.
- Click the letter at the top of the first column you want to exclude to select the entire column. To select multiple adjacent columns, click and drag across the letters. For non-adjacent columns, hold Ctrl (Windows) or Cmd (Mac) while clicking each letter.
- Right-click the selected column letters and choose Hide. The columns disappear from view, but the data is still there.
- Go to File > Save As (or Export on newer Mac versions).
- In the “Save as type� dropdown, choose CSV UTF-8 (Comma delimited) (*.csv) (Windows) or Comma Separated Values (.csv) (Mac).
- Enter a file name and click Save. If Excel warns that only the active sheet will be saved, click OK.
After saving, you can unhide the columns in the original workbook by selecting the columns on either side of the hidden ones, right-clicking, and choosing Unhide.
Method 2: Copy to a New Sheet (Safer for Reuse)
If you want to keep the original worksheet intact and avoid accidentally saving hidden columns later, copy the desired columns to a fresh sheet.
- Select the columns you want to export by clicking and dragging across the column letters.
- Right-click the selection and choose Copy (or press Ctrl+C / Cmd+C).
- Click the + icon at the bottom to create a new worksheet.
- Click cell A1 in the new sheet, right-click, and choose Paste (or press Ctrl+V / Cmd+V). The values and formatting are pasted.
- Now save this new sheet as a CSV using the same steps as above.
This method is especially useful when you need to export different column sets from the same dataset repeatedly.
What About Multiple Sheets?
CSV files cannot store multiple worksheets. When you save a workbook as CSV, Excel only saves the currently active sheet. If you have data spread across several sheets and need to combine specific columns from each into one CSV, you must first copy the columns from each sheet into a single sheet, then export that combined sheet.
For example, if Sheet1 has customer names and Sheet2 has their order totals, you would copy the names to Sheet2 (or a new sheet) alongside the totals, then save that combined sheet as CSV.
Handling Commas, Quotes, and Special Characters
CSV files use commas to separate columns. If any cell contains a comma (e.g., “Smith, John�), Excel will wrap that value in double quotes when saving. This is standard and most programs will read it correctly. However, if your data contains double quotes themselves, Excel will double them (e.g., a value like He said "hi" becomes "He said ""hi"""). This is also standard CSV behavior.
If you are using a non-English character set (like accented letters), choose CSV UTF-8 instead of the plain “CSV (Comma delimited)� option to avoid character corruption. UTF-8 is the modern default and works with virtually all software.
Common Mistakes and How to Avoid Them
- Saving the whole workbook instead of the active sheet: Excel only saves the active sheet to CSV. Double-check which sheet is active before saving.
- Forgetting to unhide columns later: If you hide columns and then save the workbook in .xlsx format, the hidden columns remain hidden. This can confuse other users.
- Using the wrong CSV delimiter: Some regions use semicolons instead of commas. If your CSV opens with all data in one column, change the delimiter in the receiving program or use Excel’s “Text to Columns� feature.
- Losing formulas: CSV stores only values, not formulas. If a column contains a formula, the CSV will contain the last calculated result, not the formula itself.
Alternatives: Power Query and VBA
For one-time exports, the methods above are sufficient. For repeated exports or very large datasets, consider these alternatives:
- Power Query (Get & Transform): You can load a worksheet, remove unwanted columns, and then export the result to CSV. This is more flexible but requires a few more steps.
- VBA macro: A simple macro can automate the hide-and-save process. For example, you could record a macro while hiding columns and saving as CSV, then run it whenever needed.
- Google Sheets: If you are using Google Sheets, you can select the desired columns, copy them to a new sheet, and then download that sheet as CSV via File > Download > Comma-separated values (.csv).
Frequently Asked Questions
Why does my CSV file contain all columns even after I hide some?
This happens if you save the file as .xlsx first and then convert it, or if you used “Save As� but did not select the CSV format. Also, check that the columns are truly hidden (not just narrow). If the column width is set to 0, it is hidden; if it is set to 1-2 pixels, it may still be considered visible.
Can I save only certain rows as well as columns?
Yes, but you must filter or delete the unwanted rows before saving. Excel’s CSV export always includes all visible rows in the active sheet. Use the Filter feature to hide rows, then save as CSV—only visible rows will be exported.
Will the CSV file keep my column headers?
Yes, if your headers are in the first row of the selected columns, they will be included as the first row of the CSV file. If you do not want headers, delete that row before saving.
How do I open a CSV file without losing the leading zeros in numbers like zip codes?
CSV files store numbers as plain text, so leading zeros are preserved in the file itself. However, when you open the CSV in Excel, Excel may strip them. To prevent this, open the CSV using the “Text Import Wizard� (or “From Text/CSV� in Data tab) and set the column format to “Text� for those columns.
Is there a way to save multiple column sets to different CSV files at once?
Not directly. You would need to create a separate sheet for each column set and save each sheet as its own CSV. A VBA macro can automate this if you do it often.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.