html中的Excel超链接在新窗口中打开

时间:2012-11-12 02:43:00

标签: javascript html excel

我有一个包含数千个超链接的Excel文档。当我将其保存为HTML时,我希望超链接打开到一个新窗口,而是在同一窗口中打开。

我知道我可以更改目标以将其修复为_blank,但我不想手动编辑所有1000个条目。

base target=_blank似乎也无效,

以下是html代码的示例。

 <tr height=17 style='height:12.75pt'>
  <td height=17 class=xl65 style='height:12.75pt'><a
  href="http://tpbsmi.co.nz:8080/arsys/servlet/ViewFormServlet?    form=AST%     3AComputerSystem&amp;server=tptbsm008.transpower.co.nz&amp;eid=000000000003270|0000000000549    54|000000000003270|000000000054954"
  target="_parent"><span style='color:blue'>tptapp508.tpdev.transp<span
  style='display:none'>ower.co.nz</span></span></a></td>
  <td>Delete</td>
  <td>Hardware</td>
  <td>Processing Unit</td>
  <td>Server</td>
  <td colspan=2 style='mso-ignore:colspan'>VMware Virtual Platform</td>
  </tr>

1 个答案:

答案 0 :(得分:2)

在Excel 2007及类似版本中,HTML Anchor标记的target属性默认为_parent。所以很容易找到:

target="_parent"

并将其全部替换为:

target="_blank"

记事本快速完成。

相关问题