.csv files

How do I create .csv files using either Pages or Microsoft Word for Mac?

Posted on Jun 28, 2012 2:34 AM

Reply
5 replies

Jun 28, 2012 10:56 AM in response to Slater Tubman1

Hi Slater,


CSV is a means of storing tabular data in a linear text file, using separators (commas) to separate the contents of cells in a row and returns to separate one row from the next.


The tabular data is usually set up in a data table, then exported from that table as a CSV file, with the separators inserted.


Numbers or MS Excel, both spreadsheet applications able to export directly to CSV, would be more appropriate tools for this task than either Pages or MS Word.


Regards,

Barry

Jun 28, 2012 7:11 PM in response to Barry

Here is what I am working from. I have a ham radio logging program on my iPad and when giving it a test run, I asked to print the log. This is what the program came up with:


Copy the below text into a plain-text file and save it with a .CSV extension, then open with your spreadsheet application.

/////////////////////////////////////

Date,Band,Mode,Callsign,Class,Section,Operator,Comment

2012-06-28 07:59:53,20,PHONE,VE5DC,2A,SK,,

2012-06-28 07:59:31,20,PHONE,K4IO,1A,SCA,,

2012-06-28 07:58:50,20,PHONE,K8BZ,1D,MII,,


I have tried any way that I can figure and so far have not had a satisfactory result. My current problem is to save it anywhere and be able to tag .csv to the file name.

Jun 29, 2012 12:20 AM in response to Slater Tubman1

Hi Slater,


OK. Apparently I misunderstood your earlier description.


You have a log from the logging application, which is a text file, part of which is in CSV format (values separated by commas, records separated by returns).


Here are two methods to convert that to a table in Numbers or MS Excel (or other spreadsheet application), or to convert it to a table in Pages.


1 Save as a .csv file, then import that file into a spreadsheet application.

  • Select the text from "Date" to after the last comma in the last line of data from the log.
  • Copy.
  • Open a new file in Text Edit (or any other text editor).
  • Click in the file window and Paste. (See Note)
  • Ensure that the file is 'plain text,' not 'rich text' (In Text Edit, this is indicated in the Format menu).
  • Save the file with a descriptive name AND the .csv extension (eg. log20120628.csv)
  • Launch Numbers (or some other spreadsheet application).
  • Go file > Open, locate the saved file, select it, then click Open.
    OR
    Drag the file's icon onto the Numbers icon in the Dock.


Results (in Numbers) should resemble this:

User uploaded file

Note: If your system is set to use the comma as the decimal separator, insert this step after pasting:

Press command-F to open Find/Replace. Enter a comma (,) in the Find box, and a semi colon (;) in the replace box. Click Replace all.


2: Replace the commas with tabs, then use Copy/Paste to place the data into a table in Pages or Numbers.

  • Select and copy the data from the log (as above)
  • Open a new blank word processing document in Pages.
  • Click in the document and Paste.
  • Press command-F to open find/Replace.
  • Type a comma in the Find box, press tab to move to the Replace with box.
  • Press option-tab to insert a tab character in the Replace with box.
  • Click Replace all. Close Find/Replace.
  • Select the data.
  • Go Format > Table > Convert Text to Table

Results as shown below:

User uploaded file


Regards,

Barry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

.csv files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.