Main Menu

Wrong separator

Started by Hefaistos, November 22, 2015, 08:48:52 AM

Previous topic - Next topic

Hefaistos

An extra carriage return and line in Caption-Abstract is seen as a separator in CSV.
While the comma should be the separation.
How do I avoid this ?

Phil Harvey

Add quotes around the CSV item if it contains commas or control characters like linefeeds.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).


Hefaistos

#3
I have tried a lot with this picture and quotes.
The csv goes wrong with Caption-Abstract
When I  import it in excel the caption is distributed over 2 rows

I use  in a excel macro :
FileArgs = "-csv -f " & Folder & " > " & OutputFile 
Tags = " -Objectname " & "-Caption-Abstract " & "-Headline " & "-Keywords " & "-Category " & "-Credit " & "-DateCreated "
cmd = "cmd /k " & Exiftool & Tags & FileArgs
Call Shell(cmd)

StarGeek

This might be an Excel problem rather than an Exiftool problem.

I found this StackOverflow answer which has two suggestions.

One person was having problems because the CSV file was not in ASCII or UTF-8.

The other person fixed the problem by just double clicking the file and letting Excel load it automatically rather than using the Open file menu which brought up the Import Wizard.

Can you post an example CSV file?
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Hefaistos

Here is the csv file that i get with the macro

StarGeek

I don't have Excel, but it appears to have loaded into Libre Office correctly.  Your captions load into a single cell even though they have line breaks.

Screen Cap

It seems to me that it is an Excel problem.  For Libre Office, I did have to make sure it that the only separator option was comma. 
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Hefaistos

libre office dus the job so to see.
Gonna try it tomorrow good night