views:

193

answers:

2

I have some URLs in an Excel file which I have saved as a .htm (webpage) file. I then view these in a browser via our wiki (MediaWiki). This is done using an iFrame embedded in the wiki page.

So, just for clarity, the link is in a htm file viewed via an iFrame in a wiki page.

When I click on that link, it opens inside the iFrame. What I want is for it to open in a new browser window. (This should be the user's default browser since some use Internet Explorer and some Firefox.)

The final twist is that some users have Windows XP and some Solaris.

Following the first answer I should clarify: I use Insert -> Hyperlink to add the URL to text in a cell (in Excel).

Help greatly appreciated.

+1  A: 

Native MS Excel does not appear to support the the definition of target='_blank' on hyperlinks. However, if you are generating the HTML/Excel file yourself you could add target="_blank" to all anchor tags and that should do the trick.

Mitchel Sellers
Thx for the quick reply. How can I add that? By default I use Insert -> Hyperlink to the text in a cell. (I guess I should have mentioned that in the question.)
Mark Robinson
Yes, if you are using native MS Excel, you CANNOT input the value from what I can tell.MS Excel can open regular HTML files as documents, and doing that you can control the link a bit better.
Mitchel Sellers
Hmmm, I see. OK, thanks.
Mark Robinson
A: 

I followed Mitchel's advice and opened the .htm file in Notepad++. Then I changed the hyperlink code directly, resulting in something like this:

  <td height=17 class=xl24 style='height:12.75pt'><a
  href="<full URL>" target='_blank'>Direct
  Popup</a></td>

This opens the target, as he says, in a separate window.

When I opened the .htm file in Excel, I could not see target='_blank'. This confirms what Mitchel said - it (unfortunately) does not support this. =:-(

So, just to be clear:

before:

<a href="<url> > Direct Popup</a>

after (direct editing in Notepad++):

<a href="<url> target='_blank'> Direct Popup</a>

replacing <url> with the full URL path.

Oh, and Notepad (not just ++) probably works fine as well...

Mark Robinson
Mark Robinson