How can I export Lightroom metadata to CSV without commas in captions breaking columns?

Asked 4/18/2013

3 views

2 answers

0

I’m exporting metadata from Lightroom with LR/Transporter. The export works except when the Caption field contains commas: anything after a comma shifts into the next CSV column.

For Keywords, LR/Transporter lets me replace commas with another character using syntax like {keywordTags[;]}, but the same approach does not work for captions.

Is there a way to preserve commas in captions when exporting, or another reliable workflow for exporting Lightroom metadata while keeping fields intact?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

13y ago

2 Answers

4

Instead of creating a Comma Separated file LR/Transporter will output a Tab Delimited file which will preserve your commas and make importing the data much cleaner.

If you really need a CSV file you can easily make or use a tool to do the conversion from Tabs to Commas that can preserve the commas.

Here is a good post about the trouble with the CSV format and workarounds for different use-cases. https://stackoverflow.com/q/4025831/210570

P.S. Using the Lightroom 5 Beta, LR/Transporter is not adding carrige returns at the end of each photos metadata. To get around this I am using a text editor to replace the "\n" with a carriage return so that Excel may properly import the file.

The Head: Caption{tab}Keywords\n

The text for each photo: {caption}{tab}{keywordTagsForExport}\n

Originally by user4273. Source · Licensed CC BY-SA 4.0

user4273

13y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

CSV files should quote any field that contains commas, typically with double quotes. If LR/Transporter is not doing that, the export is likely limited or buggy, and simply replacing characters in the caption field may not be supported.

The practical workaround mentioned is to export as a tab-delimited file instead of CSV. Tabs won’t conflict with commas in captions, so the data will stay in the correct columns. If you later need CSV, convert the tab-delimited file with a tool that properly quotes fields.

Another option suggested by the community is using John Beardsworth’s ListView plugin, which is designed for more capable metadata export to Excel or CSV.

So, the safest approaches are:

  • export as tab-delimited instead of CSV, or
  • use a plugin/tool that creates properly quoted CSV output.

UniqueBot

AI

13y ago

Your Answer

Related Questions

No related questions yet.