+ Reply to Thread
Results 1 to 8 of 8

Turning an Excel file into CSV

  1. #1
    Registered User
    Join Date
    12-02-2020
    Location
    Oslo, Norway
    MS-Off Ver
    2010
    Posts
    10

    Red face Turning an Excel file into CSV

    Hello there!
    So I have this Excel file with information about different countries spread across the different lines. To input this information on this program I need this to be a CSV file. For what I understand, I need to display the information from each country which are on the different columns all in the same cell, separated by commas. I managed to do that with a =B2&","&C2&","&D2&..... (I have no idea if this is the right way btw). Now what?
    Would very much appreciate some guidance, in a veeeeeeeeeeery newbie language thaaaaaanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,424

    Re: Turning an Excel file into CSV

    Have you tried just saving the file as a .csv? That is, File | Save | choose CSV from the list of file types. You shouldn't need to concatenate the data into one cell.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-02-2020
    Location
    Oslo, Norway
    MS-Off Ver
    2010
    Posts
    10

    Re: Turning an Excel file into CSV

    Yes I did that.. but so any application that needs data to be on a CSV format will be able to read the data, even if it is separated in the different cells, as long as it is saved as a CVS file?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,424

    Re: Turning an Excel file into CSV

    When you create a CSV file, each row of data will become one record in the CSV file. The data in the cells will appear in the row separated by commas. If you have empty cells, you'll get two commas.

    Have a look at the attached examples. One is a sample from another thread, the second is the same file saved as a CSV file. View it in NotePad.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-02-2020
    Location
    Oslo, Norway
    MS-Off Ver
    2010
    Posts
    10

    Re: Turning an Excel file into CSV

    So I did "save file as" and chose "CSV (separated by commas)", but my new CSV file still has all the data in the different columns, not separated by commas. The only difference is that it erased all the formatting (colors and such). And I also get a message from Excel stating a "possible data loss" or something (loosely translated). That's why I thought I had to concatenate the data into one cell myself.

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: Turning an Excel file into CSV

    Open the CSV file in Notepad and you will see that it is correctly laid out. CSV files are plain text and don't contain formatting.
    Rory

  7. #7
    Registered User
    Join Date
    12-02-2020
    Location
    Oslo, Norway
    MS-Off Ver
    2010
    Posts
    10

    Re: Turning an Excel file into CSV

    Ohhh yes ok.. that was it then! Thanks both!

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,424

    Re: Turning an Excel file into CSV

    You're welcome.

    As rorya and I both said, view the file in NotePad. Often, if not always these days, CSV files default to opening in Excel. In which case, the data should appear in the same cells/rows/columns, which is what you want, and without formatting, which you (and the other programs) don't need.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Turning an excel file into a csv.txt file
    By Kevin P in forum Excel General
    Replies: 0
    Last Post: 10-18-2012, 08:29 AM
  2. Turning off AutoFilter via VBA does not seem to work for this file.
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-16-2012, 11:38 AM
  3. Help with turning off auto numbering once a excel file is saved
    By mkeehn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2011, 07:22 PM
  4. turning off save file prompt
    By cmoral1266 in forum Excel General
    Replies: 0
    Last Post: 08-30-2011, 11:01 AM
  5. Replies: 1
    Last Post: 01-26-2006, 01:00 AM
  6. [SOLVED] Turning off automatic calculation when opening a CSV file
    By Will in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2005, 06:05 AM
  7. [SOLVED] Disabling formulas and turning file into text only
    By Christine in forum Excel General
    Replies: 3
    Last Post: 04-01-2005, 01:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1