HTML a Excel: ¿Cómo puede decirle a Excel que oculte una parte de la celda?

I am exporting an HTML table to excell but would like to hide interactive parts of table like tooltips:

<th>Cell header <a href="#" class="tooltip" title="Meaning of header">?</a></th>

I tried to hide the tooltip in excell by adding this css line:

.tooltip { display: none; }

It does not hide anything. Furthermore the anchor seems to be applied to the whole cell. Should I use a special mso- attribute to do that or is there another workaround?

Ultimately, is it possible to hide a part of a cell?

preguntado el 09 de marzo de 12 a las 13:03

Excel hyperlinks always extend to the whole cell - there's no way to hyperlink just a part of the text in a cell -

2 Respuestas

Dos opciones:

If there is a specific string that you'd like to remove within the cell contents - for example it's always class="tooltip" - you can use find and replace. Put the string in the find box and leave the replace box empty. It will strip it out of each cell.

If you want to get rid of the hyperlinks and html, you can try to copy the pasted table cells and then use Paste Special => Values. Sometimes that can get rid of unwanted html.

respondido 10 mar '12, 01:03

You could use jQuery and do something like:


With would effectively remove the anchor tag but keep the text.

respondido 09 mar '12, 13:03

I don't want to see the ? and I don't think I can use javascript neither jQuery in an excel sheet. Remember I don't want to change the appearence of the original table. - sinsedrix

Ah ok, I misinterpreted your question as it reads as though you have HTML and you want to save it to excel. - Steve

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.