How can I convert this excel file so that it is not only one row?

PollPenn

I've got an Excel file, shown in the picture below, and available for download here. What I need is to extract the variables under Item (Column B) and the values in column G. As a start, I tried saving the Excel file as a comma-delimited .csv file, but when I check the number of rows in the Mac OS X Terminal, it tells me that the CSV file is just one row:

$ wc -l Layout.csv
0 Layout.csv

Any idea for why this might be the case?

Excel file

Here is the CSV file opened in a text editor, showing that it has multiple lines:

csv version of file

You can download that file here.

Warren Young

After seeing your CSV output, the problem is clear: you told Excel to use CR line endings, probably because it informed you that they are "Macintosh" style. That is badly outdated information, not true for over a decade now.

There are three main line ending styles:

  1. LF: The style used by Unix and all its primary derivatives, including Mac OS X.

  2. CR: The style chosen by "classic" Mac OS, abandoned by Apple in 2001 with the move to Mac OS X. Since classic Mac OS is the only popular OS to ever use this style, it is almost never seen any more in practice. The CSV file you have linked to is one of these rare examples.

  3. CR+LF: The DOS/Windows style of line ending. Technically, this style is truer to the history of ASCII, and therefore "more correct," but it is uncommon to see outside of the Microsoft world.

The best way to fix this is to get Excel to use LF line endings, that being the native form for OS X, which will make wc and other command line Unix tools happy. But, that is outside the scope of this forum. (Try Super User if you really can't work it out on your own.)

An on-topic Unix command line way to fix it is:

$ tr '\r' '\n' < Layout.csv > Layout-LF.csv

(This is one of those sorts of problems that has about as many different solutions as there are people offering them.)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I transpose my data so it only have one row per group in R?

From Dev

How can I combine multiple records and sum the Amount row, so there is only one record after?

From Dev

How can I print only one row with specific id in Laravel?

From Dev

How to convert Coredump .gz file so that I can read it

From Dev

How can I call only one line of an html file?

From Dev

Can I copy only one row/field from a recordset to an excel column

From Dev

How can i write excel columns into one column in text file?

From Dev

Swift How do I convert document file URLs to strings so I can display the file names in tableview

From Dev

Read only one row of a big Excel file with PHPExcel

From Dev

How can I Destroy AUI-Form-Validator so I only have one instance

From Dev

How can i analysis the output of the three machine learning model so that i only get the one result?

From Dev

How can I capture the mouse in a DataGridViewRow, so it only moves within the row

From Dev

In rails, how to select one specific column's data from a table? (there is only 1 row so I want only a specific result but not an array)

From Dev

How can I sort on a column so that row height doesn't change in Microsoft Excel?

From Dev

How do I make it so that a user can not post more than one message in a row, discord.js

From Dev

How to turn just one row of a matrix into a vector so I can do a linear regression on it?

From Dev

How can I count cells in a row but only count adjacent cells once in Excel

From Dev

laravel 5.1 : how can i update one row only with where clause?

From Dev

How can I write only three e-mail adress in one row

From Dev

How can i join various CSV files into only one in same row comma separated?

From Dev

How can I adjust this code so it only has one array but you make it into an object (so you can work with it as a JObject in the front end)?

From Dev

How can I replace values in one Excel column with values concatenated from a variable number of columns in the same row?

From Dev

how I can insert just one row?

From Dev

How can I separate my pics and videos so only the one the user post is displayed?

From Dev

How can I remove the rows that matches from one Excel column with another Excel file? With VBA

From Dev

I have a number for the last row of the excel sheet. How do I incorporate this with the range function so that I can autofill some data?

From Dev

How can I convert currency on Excel Sheet?

From Dev

How can I search a column through only one specific table in excel?

From Dev

How can I restrict an AutoFilter in Excel Interop to only act on the rows in one column?

Related Related

  1. 1

    How can I transpose my data so it only have one row per group in R?

  2. 2

    How can I combine multiple records and sum the Amount row, so there is only one record after?

  3. 3

    How can I print only one row with specific id in Laravel?

  4. 4

    How to convert Coredump .gz file so that I can read it

  5. 5

    How can I call only one line of an html file?

  6. 6

    Can I copy only one row/field from a recordset to an excel column

  7. 7

    How can i write excel columns into one column in text file?

  8. 8

    Swift How do I convert document file URLs to strings so I can display the file names in tableview

  9. 9

    Read only one row of a big Excel file with PHPExcel

  10. 10

    How can I Destroy AUI-Form-Validator so I only have one instance

  11. 11

    How can i analysis the output of the three machine learning model so that i only get the one result?

  12. 12

    How can I capture the mouse in a DataGridViewRow, so it only moves within the row

  13. 13

    In rails, how to select one specific column's data from a table? (there is only 1 row so I want only a specific result but not an array)

  14. 14

    How can I sort on a column so that row height doesn't change in Microsoft Excel?

  15. 15

    How do I make it so that a user can not post more than one message in a row, discord.js

  16. 16

    How to turn just one row of a matrix into a vector so I can do a linear regression on it?

  17. 17

    How can I count cells in a row but only count adjacent cells once in Excel

  18. 18

    laravel 5.1 : how can i update one row only with where clause?

  19. 19

    How can I write only three e-mail adress in one row

  20. 20

    How can i join various CSV files into only one in same row comma separated?

  21. 21

    How can I adjust this code so it only has one array but you make it into an object (so you can work with it as a JObject in the front end)?

  22. 22

    How can I replace values in one Excel column with values concatenated from a variable number of columns in the same row?

  23. 23

    how I can insert just one row?

  24. 24

    How can I separate my pics and videos so only the one the user post is displayed?

  25. 25

    How can I remove the rows that matches from one Excel column with another Excel file? With VBA

  26. 26

    I have a number for the last row of the excel sheet. How do I incorporate this with the range function so that I can autofill some data?

  27. 27

    How can I convert currency on Excel Sheet?

  28. 28

    How can I search a column through only one specific table in excel?

  29. 29

    How can I restrict an AutoFilter in Excel Interop to only act on the rows in one column?

HotTag

Archive