Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try copy different links from Firefox into Excel but links-numbers are formatted like text and not like hyperlinks.

Paste links from Firefox into Word - numbers-links are recognized:
ss of excel #1

Paste links from Firefox into Excel - numbers-links are NOT recognized..Why? ss of excel #2

Live Example:

share|improve this question
Could you edit your question to dd some live examples (not just images) of the links you are having problems with? (And welcome to StackOverflow!) – chuff Jun 1 '13 at 20:22
Please post the URL that you're having problems with, number-links are working fine for me, pasting them in excel retains it's formatting. – Zain Patel Jun 1 '13 at 22:27
Yes..i have problem to recognize number-links like this: – user227354 Jun 2 '13 at 11:58
up vote 1 down vote accepted

The problem stems from the fact that there are missing HTML elements, I'll explain below:

  1. Opening the page, selecting all the links and pasting into Excel gives me this:

    Excel Screenshot of initial problem

  2. This is your problem. The HTML code of the page is like this:

    Code screenshot of initial problem

  3. Upon editing the code slightly, I then try copying the links again, pasting it into Excel results in this:

    Ecel Screenshot of final paste

  4. The edited code looks like this: enter image description here

Note these

<span class="minipagelink">

I cannot actually find the definitions of those classes, also the number 1 are seperate hyperlinks that are delimited through a non-existent spanning class without a breaking-line, upon inserting this breaking line in the code, it immediately works. Therefore we can isolate the problem, to being the lack of breaks between the links.

<a href="">1</a>
<a href="">2</a>

would not work, however something like this:

<a href="">1</a><br>
<<a href="">2</a><br>

would work.

The reason this works in word but not excel is because excel cannot have more than one hyperlink in a cell. Excel uses the <br> element to categorize each line in a different cell. So when you had 1, 2 without a breaking line in between, Excel would shove them in once cell, and there cannot be more than one hyperlink in one cell.

-Hope I helped, thanks. :D

share|improve this answer
yes.. inserting breaking line the links are recognized..thank you – user227354 Jun 2 '13 at 15:10
  1. Excel can not have multiple different hyperlinks in 1 (one) cell
  2. When pasting HTML , Excel decides based on elements like BR what is "1 cell"
  3. In your case there are no breaking elements between 2 hyperlinks (in this case numbers as you thought it was about numbers but the same applies to anything also text, it was just coincedence that it was just numbers)

example 1, this will work:

<a href="">a</a><br />
<a href="">b</a>

example 2, this will not work:

<a href="">a</a>
<a href="">b</a>

Solution: indicate to Excel what should be in one cell e.g. by adding a line break in between (remember that Excel is a spreadsheet and needs a way to know what is "the spreadsheet" in that html page).

(as for your question on why this works in Word: Word is no spreadsheet so does not need to determine what is in 1 cell)

share|improve this answer
Ooops, I think your answer came before mine - I noticed the same problem and posted it too. Sorry. – Zain Patel Jun 2 '13 at 12:45
Thank you, I did not think it was a problem of html code .. – user227354 Jun 2 '13 at 15:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .