# Problems transferring HTML to Excel

**URL:** <https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793>\
**Category:** Support\
**Created:** [February 13, 2018, 1:36pm UTC](https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793 "2018-02-13T13:36:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![fobar2017](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/f4b2a3/32.png) [@fobar2017](https://community.mp3tag.de/u/fobar2017)\
**Post date:** [February 13, 2018, 1:36pm UTC](https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793/1 "2018-02-13T13:36:25Z")

</div>

I create an HTML output to copy and paste into Excel. Here I can add times (length of track or album) and everything is in one place. The problem I'm having is that "Sometimes" the copy and paste doesn't work and I have no clue as to why. I've checked all input data and their all the same yet instead of seperate cells as in the output of the HTML I end up with a string. But it doesn't happen all the time, like I said before only "Sometimes". It could be only with 2 entries or 35 entries. The file will give you an idea of what I'm talking about.

 ![File%20Output%20HTML](https://community.mp3tag.de/uploads/default/original/2X/a/ad5c049ef071fa56513ccb9811eaa5dabd2663ba.jpg).  
Hopefully somebody can figure this out. Could have something to do with the HTML code. I have no idea.

---

<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:** [February 13, 2018, 1:47pm UTC](https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793/2 "2018-02-13T13:47:33Z")

</div>

To be quite honest: I cannot see any HTML code - I only see output.  
So the export script would be quite nice.

But when I hear "Excel" I think of CSV files and not HTML.  
It might be much easier to get the data where you want to treat it if you create a plain text output with $char(9) (=Tab character) as separator.

And did you know that you already now in an export you can output the length of each track and add it up to a total length of all those selected files?

---

<div class="post-metadata">

**Author:** ![fobar2017](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/f4b2a3/32.png) [@fobar2017](https://community.mp3tag.de/u/fobar2017)\
**Post date:** [February 14, 2018, 12:16pm UTC](https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793/3 "2018-02-14T12:16:06Z")

</div>

The HTML code is the same code used in MP3Tag to produce an HTML\_standard page. The difference between the original code and the one I'm using is that there are two blank columns prior to the length (time)column and I do have the total time in the HTML code. I've tried the csv file type and it does go into Excel however all I end up with is one big string of data not a spreadsheet , unless there's a way of converting the data into a spreadsheet and if there is I have no clue how to do it and as far as a csv file is concerned you can only use 1 csv file per page where copying and pasting the results of a HTML page is continuous.You ought to try it just once and see what the outcome is, much easier than that csv mess.  
I have found that if you produce an HTML page with a large amount of data, about 2000 entries, I have found some really strange stuff like double entries and sometimes entries left out. I've attached the results of the HTML (copy,paste) vs csv just so you can see the difference and if you want the code from MP3Tag for the HTML output I'll be more than happy to post a copy.

 ![HTML%20vresus%20csv](https://community.mp3tag.de/uploads/default/original/2X/7/7129ddd42237b811380e1da98ccd0e7a926ceb90.jpg)

---

<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:** [February 14, 2018, 12:36pm UTC](https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793/4 "2018-02-14T12:36:54Z")

</div>

> [@fobar2017](#):
>
> I’ve tried the csv file type and it does go into Excel however all I end up with is one big string of data not a spreadsheet , unless there’s a way of converting the data into a spreadsheet and if there is I have no clue how to do it and as far as a csv file is concerned you can only use 1 csv file per page where copying and pasting the results of a HTML page is continuous.

The workflow should be modified from copy&paste to "Export, then open in Excel".  
See the Excel File\>Open options where you can select CSV as file type.  
Still, the ordinary CSV export script could be modified in such a way that the semicolon is replaces by a tab character as this usually avoids problems with data that already contains a semicolon.  
Also, this thread may be of interest as it deals with the total length:

> [@Sum "Length" on html standard output](https://community.mp3tag.de/t/sum-length-on-html-standard-output/19724):
>
> All my outputs in regards to albums are done in "html\_standard". I've added "length" to the output just for reference. The question is, can the "total length" (time) be added to the"html\_standard" output? I know that on the bottom of MP3Tag it gives you the info on how long a particular album is. Needless to say there are albums that are over 60 minutes (actually double discs) so the coding would have to allow for that. I've tried doing it in Excel but I gave up, no matter how I formatted the ce…

Just to give you an impression of a simple csv-export script:

$filename(csv,utf-16)Artist$char(9)Composer$char(9)Album$char(9)Title  
$loop(%artist%)%artist%$char(9)%composer%$char(9)%album%$char(9)%title%  
$loopend()

Select a couple of files,  
Create a new export,  
copy the code and overwrite with it the sample export script of the new export.  
Save the export script  
Execute the export.  
If everything is set to normal in your system, then you will probably be asked whether you want to open the result in Excel.

---

<div class="post-metadata">

**Author:** ![fobar2017](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/f4b2a3/32.png) [@fobar2017](https://community.mp3tag.de/u/fobar2017)\
**Post date:** [February 15, 2018, 7:13pm UTC](https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793/5 "2018-02-15T19:13:54Z")

</div>

I looked at the csv script that comes wit MP3Tag and it's similar or about the same as HTML except it's called in the script csv. I tried it in Excel, had to find out how to do it but after fooling around with it it came out ok. Basically I can move things around and delete what I don't want to satisfy what I want the results to look like except for one item, LENGTH. Not being familiar with csv I looked it up and I'm guessing that because it is a text file it doesn't work with time. There is an entry in the csv script for time(length) %\_length\_seconds% but it only comes out a number like if the track length was 02:45 it comes out like 151. Other than it is a lot faster than copy and paste

---

<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:** [February 15, 2018, 7:53pm UTC](https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793/6 "2018-02-15T19:53:37Z")

</div>

Have a look at the help on export: [https://docs.mp3tag.de/export](https://docs.mp3tag.de/export)  
More at the bottom of the page you find some more variables that you might use for your export.  
To see the length of a file use %\_length% (not %\_length\_seconds%)  
To see the total length of the set, place the output of %\_total\_length% behind the last $loopend() statement.

And: csv and HTML are by no means similar. I don't know what you compared.

---

<div class="post-metadata">

**Author:** ![fobar2017](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/f4b2a3/32.png) [@fobar2017](https://community.mp3tag.de/u/fobar2017)\
**Post date:** [February 16, 2018, 5:31pm UTC](https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793/7 "2018-02-16T17:31:36Z")

</div>

By no means did I enter the expression %\_length\_seconds%, it's already there in the expression when you open the csv file in MP3Tag. I just said that it was already there and I didn't know why it didn't work. In regards to comparing csv to HTML maybe I should have said CSS and the reason why is the expressions are almost written the same as that if you open up the html\_standard that is in MP3Tag. There are similarities and I know they are a different style of output.  
Haven't looked at the link you provided as of yet but I will, definitely.

---

<div class="post-metadata">

**Author:** ![fobar2017](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/f4b2a3/32.png) [@fobar2017](https://community.mp3tag.de/u/fobar2017)\
**Post date:** [February 17, 2018, 5:09pm UTC](https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793/8 "2018-02-17T17:09:41Z")

</div>

I found that using %\_lenght\_seconds% converts the minutes to seconds and if you want the data in Excel to be minutes and seconds you must convert. After reading the options for exporting I learned a lot. Have no problem importing the data using csv. I never used that format even though I knew it existed but never knew how to convert the result to a be meaningful, much, much quicker importing data. I'm glad you told me about it and many thanks.

---

<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:** [March 4, 2025, 4:05pm UTC](https://community.mp3tag.de/t/problems-transferring-html-to-excel/40793/9 "2025-03-04T16:05:52Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
