# Exporting to excel part 2

**URL:** https://community.mp3tag.de/t/exporting-to-excel-part-2/62647
**Category:** Support
**Created:** [November 3, 2023, 7:55pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647 "2023-11-03T19:55:42Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 3, 2023, 7:55pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/1 "2023-11-03T19:55:42Z")

</div>

![image](https://community.mp3tag.de/uploads/default/original/2X/9/915f634d9ed8382d23454858d536ef4a94a99aba.png)

the highlighted song should be in row 2. Also its not in sequential order?

this is the current path to export to excel

```auto
$filename(csv,utf-16)Title$char(9)Artist$char(9)Album$char(9)Track$char(9)Year$char(9)Length$char(9)Size$char(9)Modified$char(9)Path$char(9)Filename$char(9)Genre$char(9)Comment$char(9)BPM$char(9)Bitrate$loop(%_filename_ext%)%title%$char(9)%artist%$char(9)%album%$char(9)%track%$char(9)%year%$char(9)%_length%$char(9)%_file_size%$char(9)%_file_mod_date%$char(9)%_folderpath%$char(9)%_filename_ext%$char(9)%genre%$char(9)%comment%$char(9)%bpm%$char(9)%_bitrate%
$loopend()

```

---

<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: [November 4, 2023, 6:34am UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/2 "2023-11-04T06:34:19Z")

</div>

You would need a linebreak in front of the $loop()

```auto
$filename(csv,utf-16)Title$char(9)Artist$char(9)Album$char(9)Track$char(9)Year$char(9)Length$char(9)Size$char(9)Modified$char(9)Path$char(9)Filename$char(9)Genre$char(9)Comment$char(9)BPM$char(9)Bitrate
$loop(%_filename_ext%)%title%$char(9)%artist%$char(9)%album%$char(9)%track%$char(9)%year%$char(9)%_length%$char(9)%_file_size%$char(9)%_file_mod_date%$char(9)%_folderpath%$char(9)%_filename_ext%$char(9)%genre%$char(9)%comment%$char(9)%bpm%$char(9)%_bitrate%
$loopend()

```

and you sort by the %\_filename\_ext% - you do not say what the

> [@Scorpius](#):
>
> sequential order

would be  
If you want to keep the same order as the one that you have in the filelist then use $loop(1) instead.  
If you want to sort by ARTIST; ALBUM and then by TRACK, use $loop(%artist%%album%$num(%track%,2))

---

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 18, 2023, 2:17am UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/3 "2023-11-18T02:17:28Z")

</div>

I'm not understanding the sequence. I would like to export

filename Title Artist Album Year Genre Comment BPM Bitrate length

---

<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: [November 18, 2023, 6:37am UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/4 "2023-11-18T06:37:43Z")

</div>

Then I don't understand your problem.  
You export far more fields than just

> [@Scorpius](#):
>
> filename Title Artist Album Year Genre Comment BPM Bitrate length

title artist album track year \_length \_file\_size \_file\_mod\_date \_folderpath \_filename\_ext genre comment bpm \_bitrate

and you say that

> [@Scorpius](#):
>
> Also its not in sequential order?

What would you consider to be the sequential order? Currently, you sort by \_FILENAME\_EXT to get an order.  
To get the header line separated from the rest, you need a linebreak in the script.  
For all the other bits and pieces, you have to adapt the named columns and fields.

---

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 18, 2023, 6:58pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/5 "2023-11-18T18:58:58Z")

</div>

$filename(csv,utf-16)Title$char(9)Artist$char(9)Album$char(9)Track$char(9)Year$char(9)Length$char(9)Size$char(9)Modified$char(9)Path$char(9)Filename$char(9)Genre$char(9)Comment$char(9)BPM$char(9)Bitrate$loop(%\_filename\_ext%)%title%$char(9)%artist%$char(9)%album%$char(9)%track%$char(9)%year%$char(9)%\_length%$char(9)%\_file\_size%$char(9)%\_file\_mod\_date%$char(9)%\_folderpath%$char(9)%\_filename\_ext%$char(9)%genre%$char(9)%comment%$char(9)%bpm%$char(9)%\_bitrate%  
$loopend((%artist%%album%$num(%track%,2))

![image](https://community.mp3tag.de/uploads/default/original/2X/f/fc7dc03a48b1bc6b21447b3c581efb56752cd4a6.png)

this is the error ,message i'm getting now using the above pathway

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [November 18, 2023, 7:14pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/6 "2023-11-18T19:14:43Z")

</div>

> [@Scorpius](#):
>
> ...  
> `$loopend((%artist%%album%$num(%track%,2))`

The command `loopend` must not contain anything else then `()`

 ![image](https://community.mp3tag.de/uploads/default/original/2X/2/22a114160383f78af570665dbb321c913eef11eb.png)

You will find more details for the possible export commands in the [documentation.](https://docs.mp3tag.de/export/#export-scripting-functions)

---

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 18, 2023, 7:31pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/7 "2023-11-18T19:31:50Z")

</div>

> [@Scorpius](#):
>
> $loopend((%artist%%album%$num(%track%,2))

where does this command line "$loopend((%artist%%album%$num(%track%,2))" fit in this sequence "$filename(csv,utf-16)Title$char(9)Artist$char(9)Album$char(9)Track$char(9)Year$char(9)Length$char(9)Size$char(9)Modified$char(9)Path$char(9)Filename$char(9)Genre$char(9)Comment$char(9)BPM$char(9)Bitrate$loop(%\_filename\_ext%)%title%$char(9)%artist%$char(9)%album%$char(9)%track%$char(9)%year%$char(9)%\_length%$char(9)%\_file\_size%$char(9)%\_file\_mod\_date%$char(9)%\_folderpath%$char(9)%\_filename\_ext%$char(9)%genre%$char(9)%comment%$char(9)%bpm%$char(9)%\_bitrate%  
$loopend()"?

---

<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: [November 18, 2023, 7:52pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/8 "2023-11-18T19:52:30Z")

</div>

Where did you get

> [@Scorpius](#):
>
> $loopend((%artist%%album%$num(%track%,2))

as I wrote

> [@ohrenkino](#):
>
> $loop(%artist%%album%$num(%track%,2))

I am still missing an answer to

> [@ohrenkino](#):
>
> What would you consider to be the sequential order?

and how the long export statement that exports

> [@ohrenkino](#):
>
> title artist album track year \_length \_file\_size \_file\_mod\_date \_folderpath \_filename\_ext genre comment bpm \_bitrate

and not just

> [@Scorpius](#):
>
> filename Title Artist Album Year Genre Comment BPM Bitrate length

---

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 18, 2023, 8:21pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/9 "2023-11-18T20:21:38Z")

</div>

After using this command line : [$filename(csv,utf16)Title$char(9)Artist$char(9)Album$char(9)Track$char(9)Year$char(9)Length$char(9)Size$char(9)Modified$char(9)Path$char(9)Filename$char(9)Genre$char(9)Comment$char(9)BPM$char(9)Bitrate$loop(%\_filename\_ext%)%title%$char(9)%artist%$char(9)%album%$char(9)%track%$char(9)%year%$char(9)%\_length%$char(9)%\_file\_size%$char(9)%\_file\_mod\_date%$char(9)%\_folderpath%$char(9)%\_filename\_ext%$char(9)%genre%$char(9)%comment%$char(9)%bpm%$char(9)%\_bitrate%$loopend ()] the bottom image is what the end result

 ![image](https://community.mp3tag.de/uploads/default/original/2X/8/8d779b0d0ef04b7e6e0bf3d09423f42c575f2eb5.png)

 ![image](https://community.mp3tag.de/uploads/default/original/2X/9/915f634d9ed8382d23454858d536ef4a94a99aba.png)

this was my initial inquiry to the highlighted line in excel using this command line after the last update

$filename(csv,utf16)Title$char(9)Artist$char(9)Album$char(9)Track$char(9)Year$char(9)Length$char(9)Size$char(9)Modified$char(9)Path$char(9)Filename$char(9)Genre$char(9)Comment$char(9)BPM$char(9)Bitrate$loop(%\_filename\_ext%)%title%$char(9)%artist%$char(9)%album%$char(9)%track%$char(9)%year%$char(9)%\_length%$char(9)%\_file\_size%$char(9)%\_file\_mod\_date%$char(9)%\_folderpath%$char(9)%\_filename\_ext%$char(9)%genre%$char(9)%comment%$char(9)%bpm%$char(9)%\_bitrate%$loopend ()

---

<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: [November 18, 2023, 8:30pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/10 "2023-11-18T20:30:47Z")

</div>

I answered your

> [@Scorpius](#):
>
> initial inquiry

You need a line break in front of the $loop() statement. Edit the script and press enter in front of the $

---

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 18, 2023, 8:35pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/11 "2023-11-18T20:35:08Z")

</div>

no you have not answered me.

I've asked for the command line to avoid the image from my initial inquiry, you them told me to add this $loop(%artist%%album%$num(%track%,2)) to the command line and again you did not indicate where to add it

---

<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: [November 18, 2023, 9:22pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/12 "2023-11-18T21:22:48Z")

</div>

The answer is in  
post #2

> [@Exporting to excel part 2](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/2):
>
> You would need a linebreak in front of the $loop() $filename(csv,utf-16)Title$char(9)Artist$char(9)Album$char(9)Track$char(9)Year$char(9)Length$char(9)Size$char(9)Modified$char(9)Path$char(9)Filename$char(9)Genre$char(9)Comment$char(9)BPM$char(9)Bitrate $loop(%\_filename\_ext%)%title%$char(9)%artist%$char(9)%album%$char(9)%track%$char(9)%year%$char(9)%\_length%$char(9)%\_file\_size%$char(9)%\_file\_mod\_date%$char(9)%\_folderpath%$char(9)%\_filename\_ext%$char(9)%genre%$char(9)%comment%$char(9)%bpm%$char(…

You need to insert a line break to get the first data line under the headline.

Does that work?

---

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 19, 2023, 2:56am UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/13 "2023-11-19T02:56:23Z")

</div>

![image](https://community.mp3tag.de/uploads/default/original/2X/a/a4e9bf94901fdd6a9d164a5e1c2c5f1e34d9fd12.png)

This is the error message i get after I copied and pasted.

---

<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: [November 19, 2023, 7:27am UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/14 "2023-11-19T07:27:13Z")

</div>

You would need to copy only the code part.  
Please show me the code you use now.  
Anyway: you could check for yourself: how many $loop() and how many $loopend() statements do you have in the code right now?  
And actually, I get the following message:  
 ![export](https://community.mp3tag.de/uploads/default/original/2X/0/0335c86bd9f5d4d93afcae9174bdb2ec6d05c224.jpeg)  
and the following output with the script from post #2

 ![output](https://community.mp3tag.de/uploads/default/original/2X/9/9b27147b126c0b9b8c20bfbe4ff8f36398b1929c.jpeg)

---

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 26, 2023, 5:11am UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/15 "2023-11-26T05:11:50Z")

</div>

$loop()$filename(csv,utf16)Title$char(9)Artist$char(9)Album$char(9)Track$char(9)Year$char(9)Length$char(9)Size$char(9)Modified$char(9)Path$char(9)Filename$char(9)Genre$char(9)Comment$char(9)BPM$char(9)Bitrateloop(%\_filename\_ext%)%title%$char(9)%artist%$char(9)%album%$char(9)%track%$char(9)%year%$char(9)%\_length%$char(9)%\_file\_size%$char(9)%\_file\_mod\_date%$char(9)%\_folderpath%$char(9)%\_filename\_ext%$char(9)%genre%$char(9)%comment%$char(9)%bpm%$char

---

<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: [November 26, 2023, 7:41am UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/16 "2023-11-26T07:41:39Z")

</div>

What is that?  
To me it looks like you have copied the whole post:

> [@Exporting to excel part 2](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/2):
>
> You would need a linebreak in front of the $loop() $filename(csv,utf-16)Title$char(9)Artist$char(9)Album$char(9)Track$char(9)Year$char(9)Length$char(9)Size$char(9)Modified$char(9)Path$char(9)Filename$char(9)Genre$char(9)Comment$char(9)BPM$char(9)Bitrate $loop(%\_filename\_ext%)%title%$char(9)%artist%$char(9)%album%$char(9)%track%$char(9)%year%$char(9)%\_length%$char(9)%\_file\_size%$char(9)%\_file\_mod\_date%$char(9)%\_folderpath%$char(9)%\_filename\_ext%$char(9)%genre%$char(9)%comment%$char(9)%bpm%$char(…

... which does not really make sense and leads to invalid code.  
You would have to copy only the part from the code box.

And if that is too difficult for you, then I am afraid, I cannot help you any further.  
Just a reminder: it is your problem, not mine. So you have to get it working in your environment if it is still your intention to export a tab-separated text.

---

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 26, 2023, 6:49pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/17 "2023-11-26T18:49:14Z")

</div>

My environment? This is your problem after your last update which caused this problem in the first place. Furthermore you also showed you where getting the same error message as myself

---

<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: [November 26, 2023, 6:54pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/18 "2023-11-26T18:54:35Z")

</div>

> [@Scorpius](#):
>
> Furthermore you also showed you where getting the same error message as myself

Which error message are you referring to?  
Where did I update anything on your computer?

---

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 26, 2023, 7:03pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/19 "2023-11-26T19:03:34Z")

</div>

> [@Scorpius](#):
>
> $filename(csv,utf16)Title$char(9)Artist$char(9)Album$char(9)Track$char(9)Year$char(9)Length$char(9)Size$char(9)Modified$char(9)Path$char(9)Filename$char(9)Genre$char(9)Comment$char(9)BPM$char(9)Bitrate$loop(%\_filename\_ext%)%title%$char(9)%artist%$char(9)%album%$char(9)%track%$char(9)%year%$char(9)%\_length%$char(9)%\_file\_size%$char(9)%\_file\_mod\_date%$char(9)%\_folderpath%$char(9)%\_filename\_ext%$char(9)%genre%$char(9)%comment%$char(9)%bpm%$char(9)%\_bitrate%$loopend ()

the last update to MP3Tags program on 11/03/2023

---

<div class="post-metadata">

### Author: ![Scorpius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Scorpius](https://community.mp3tag.de/u/Scorpius)
#### Post date: [November 26, 2023, 7:04pm UTC](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647/20 "2023-11-26T19:04:13Z")

</div>

![image](https://community.mp3tag.de/uploads/default/original/2X/9/9d22860e3942a88ed5df75a6e42a9db692a158bc.png)

[Next page](https://community.mp3tag.de/t/exporting-to-excel-part-2/62647.md?page=2)
