LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   converting .ods to .csv file in LibreOffice Calc question (https://www.linuxquestions.org/questions/linux-newbie-8/converting-ods-to-csv-file-in-libreoffice-calc-question-4175604336/)

Gregg Bell 04-21-2017 12:09 PM

converting .ods to .csv file in LibreOffice Calc question
 
1 Attachment(s)
I have email lists in .csv files. Sometimes I need to copy email addresses from the .csv into a new Calc text document, which is .ods. When I "save as" it gives me the option to save as a .csv. But when I do the actual saving it gives me this popup window (screenshot) giving me the options to change the "field delimiter" and "text delimiter." I tracked this down https://help.libreoffice.org/Calc/Im...ting_CSV_Fileshttps://help.libreoffice.org/Calc/Im...ting_CSV_Files but it doesn't say what the options mean. This is my first experience with this and I just want to make sure when I send the list to the Mailchimp provdier the email lists function properly. My guess is to just go with the default, but I'd really rather not be guessing about this. Thanks.

Turbocapitalist 04-21-2017 12:15 PM

As you see, you can separate the cells with a comma or other characters like a tab. Which does the provider require?

Also, since the resulting file is text, you can view it in an editor and actually see what it has used.

DavidMcCann 04-21-2017 12:18 PM

The default is the normal for CSV: commas between fields, text in double quotes. As you see, you can separate fields with tabs, or use single quotes, etc: it's up to you.

Gregg Bell 04-21-2017 12:53 PM

Thanks guys. It's still kind of confusing, though. Sometimes when I make changes in a .csv file and just click the save button it saves it as a .csv. Other times it gives me the popup window with the options to choose the text and field delimiters.

And there are no commas or quotation marks in any of my .csv files. And it just seems like lines separate the fields.

Second, when I experimented and changed the field and text delimiters I didn't notice any difference.

What am I missing?

Turbocapitalist 04-21-2017 01:05 PM

The quotes only get used when there is something questionable in a cell that would confuse the parser otherwise. For example, if you have a comma separating the fields and then if you have a cell containing a comma, the quotes will be used around that cell, but probably skipped for all other cells.

Gregg Bell 04-21-2017 01:34 PM

Quote:

Originally Posted by Turbocapitalist (Post 5700301)
The quotes only get used when there is something questionable in a cell that would confuse the parser otherwise. For example, if you have a comma separating the fields and then if you have a cell containing a comma, the quotes will be used around that cell, but probably skipped for all other cells.

Thanks for the explanation, Turbo. I experimented and put some commas in the email addresses and they weren't surrounded by quotation marks but they were gray-highlighted to make them stand out.

I think for my purposes though I'm okay just going with the default (when it comes to saving the.ods as a .csv).

Appreciate your help.

DavidMcCann 04-22-2017 10:49 AM

I haven't tried, but I think the quotes would only be used if there was at least one numeric field. The CSV mark-up is intended for import, where the application has to know what the fields are: you can mark the text with quotes, but it's difficult to see how the numbers could be identified.

ondoho 04-22-2017 12:40 PM

Quote:

Originally Posted by Gregg Bell (Post 5700294)
And there are no commas or quotation marks in any of my .csv files. And it just seems like lines separate the fields.

are you sure you are looking at these csv files in a plain text editor?

defconmatrix 04-22-2017 12:48 PM

CSV file
 
Quote:

Originally Posted by DavidMcCann (Post 5700668)
I haven't tried, but I think the quotes would only be used if there was at least one numeric field. The CSV mark-up is intended for import, where the application has to know what the fields are: you can mark the text with quotes, but it's difficult to see how the numbers could be identified.

Provide us with a screen shot please of the CSV file's first 5 lines.

AwesomeMachine 04-22-2017 03:39 PM

Considering csv stands for "comma separated variables", it's difficult to imagine a csv file without any commas.

Gregg Bell 04-22-2017 11:54 PM

Quote:

Originally Posted by DavidMcCann (Post 5700668)
I haven't tried, but I think the quotes would only be used if there was at least one numeric field. The CSV mark-up is intended for import, where the application has to know what the fields are: you can mark the text with quotes, but it's difficult to see how the numbers could be identified.

Thanks David. I think I over-complicated this. The default works just fine.

Gregg Bell 04-22-2017 11:54 PM

Quote:

Originally Posted by ondoho (Post 5700701)
are you sure you are looking at these csv files in a plain text editor?

No, I was looking at in LibreOffice Calc.

Gregg Bell 04-22-2017 11:56 PM

Quote:

Originally Posted by defconmatrix (Post 5700705)
Provide us with a screen shot please of the CSV file's first 5 lines.

I really can't because it has people's email addresses. I'm pretty satisfied with the default anyway and am going to mark this thread as solved.

Gregg Bell 04-22-2017 11:57 PM

Quote:

Originally Posted by AwesomeMachine (Post 5700776)
Considering csv stands for "comma separated variables", it's difficult to imagine a csv file without any commas.

I thought so too! But the ones with the email addresses only have:

1)The email address
2) The first name
3) The last name.

Hence no commas anywhere.

Gregg Bell 04-22-2017 11:59 PM

Calling this one solved. I was over-analyzing this. The default is working fine for me.


All times are GMT -5. The time now is 06:00 AM.