# Export to csv when double quote is first character of title

**URL:** <https://community.mp3tag.de/t/export-to-csv-when-double-quote-is-first-character-of-title/49479>\
**Category:** Support\
**Created:** [June 29, 2020, 9:00am UTC](https://community.mp3tag.de/t/export-to-csv-when-double-quote-is-first-character-of-title/49479 "2020-06-29T09:00:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 29, 2020, 9:00am UTC](https://community.mp3tag.de/t/export-to-csv-when-double-quote-is-first-character-of-title/49479/1 "2020-06-29T09:00:15Z")

</div>

Hi  
I'm having trouble exporting to a csv for reading into Excel when the first character of the track title has a double quote. It is only an issue when the first character is a double quote - so for instance xxxxx (7" single) in the track title works fine.  
I've worked out that I need to have 3 double quotes at the beginning of the track title in the csv for Excel to import it properly.

So I have tried the following

> $if($left(%title%,1)=""",$replace(%title%,","""),%title%)

The replace bit works fine, but unfortunately replaces all instances of the double quotes in the title, so it is not recognising the = """ command - I have tried many combinations of the =""" above but cannot seem to get that to be true so that it only replaces a double quote with 3 double quotes when it exists as the first character  
Any ideas?  
Thanks

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 29, 2020, 9:03am UTC](https://community.mp3tag.de/t/export-to-csv-when-double-quote-is-first-character-of-title/49479/2 "2020-06-29T09:03:20Z")

</div>

I would use the tab character as field separator.  
So instead of the semicolon or the comma use $char(9).  
This would circumvent the entanglement of too many quotes.

---

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 29, 2020, 9:09am UTC](https://community.mp3tag.de/t/export-to-csv-when-double-quote-is-first-character-of-title/49479/3 "2020-06-29T09:09:22Z")

</div>

Thanks. I am using the | character as a field separator already, mainly for that very reason

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 29, 2020, 9:16am UTC](https://community.mp3tag.de/t/export-to-csv-when-double-quote-is-first-character-of-title/49479/4 "2020-06-29T09:16:06Z")

</div>

So? . Problem solved?

---

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 29, 2020, 9:35am UTC](https://community.mp3tag.de/t/export-to-csv-when-double-quote-is-first-character-of-title/49479/5 "2020-06-29T09:35:05Z")

</div>

No the problem is not related to the export field delimiter being used. Just managed to get it working with

> $if($eql($left(%title%,1),'"'),$replace(%title%,","""),%title%)

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 29, 2020, 9:45am UTC](https://community.mp3tag.de/t/export-to-csv-when-double-quote-is-first-character-of-title/49479/6 "2020-06-29T09:45:15Z")

</div>

> [@gsa999](#):
>
> $if($left(%title%,1)=""",$replace(%title%,","""),%title%)

This is no valid MP3tag syntax.  
See the help:  
**$if(x,y,z)** if x is true, y is returned, otherwise z.

> **[Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/#boolean-functions)**
>
> Documentation on Mp3tag's scripting functions. Mp3tag is the universal Tag Editor.

you probably need a $eql() as well.

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [February 9, 2026, 12:28pm UTC](https://community.mp3tag.de/t/export-to-csv-when-double-quote-is-first-character-of-title/49479/7 "2026-02-09T12:28:41Z")

</div>


