Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to export specific number of columns from excel into .csv file. I have around 10 columns like lname, fname, phone, address, email and so on. what should i do to export certain columns like lname, email and so on.... thanks for looking

share|improve this question

5 Answers 5

Just do in simple way:-

  1. Apply concatenation for 10 columns

    =CONCATENATE(A1,",",B1,",",C1,",",D1,",",E1,",",F1,",",G1,",",H1,",",I1,",",J1)
    
  2. Drag down list end of your last row

  3. Copy the result column
  4. Paste it in notepad
  5. Save it as .csv file format
share|improve this answer
    
CONCATENATE worked for me really great. Thank you very much. –  Nedim Šabić Jul 16 '12 at 13:09
    
Simple... unless a double quote may be found in any of your columns... –  bishop Oct 27 at 13:35

You can easily do this with a PowerShell script. You can use the Get-ExcelData function in this PowerShell snippet and pipe the results through Select-Object and finally to Export-Csv.

share|improve this answer

Select the first column you want. Then, while holding down <Ctrl>, select the remaining columns you want. Copy your selection and paste it into a new workbook. Save the new workbook as a .csv file.

If you are going to do this frequently, record a macro of your steps. Here is the macro recorded from my test. In my example, column A is Name and column E is Email. I've also modified the macro so the SaveAs filename includes the current date.


I was going to show an example macro, but for whatever reason, superuser errors out when I click Save Edits. I'll try again later.

share|improve this answer

If you open the file in Ron's Editor you can hide the columns you don't want, then export the resulting 'view' as an Excel file or any other format. Better yet you can save the view for future use. Very quick, very easy.

share|improve this answer

Yet another solution:

  1. Select the cells you want to export
  2. Wrap a table around the cells (eg, press Control+T on Windows)
  3. Run the ExportTable macro

Saves the table on the active sheet as a new CSV (by opening a new workbook and saving from there, using the table name as the file name).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.