Bonjour,
J'ai en fichiers les codes source, en html, de tableaux que j'ai fait (dans des pages Web).
Je voudrais récupérer le code html de chacune des cellules de mes tableaux pour mettre ce même code, sous forme de simple texte, en tableur Excel afin de triturer le code html.
Dans chaque cellule, le code html contient des balises html (plusieurs liens hypertextes, plusieurs images, etc. ...)
D'autre part, il peut y avoir des commentaires, sous la forme standard <!-- Ceci est un commentaire --> qu'il faudrait "oublier".
Comment m'y prendre, s'il vous plaît. Il me reste assez peu de cheveux !
Exemple pour travailler dessus : ce tableau fait 3 x 3. Je voudrais récupérer cela dans un tableau Excel similaire (3 * 3) avec juste le code html, tout le code html contenu dans chaque cellule et rien d'autre.
Cordialement
J'ai en fichiers les codes source, en html, de tableaux que j'ai fait (dans des pages Web).
Je voudrais récupérer le code html de chacune des cellules de mes tableaux pour mettre ce même code, sous forme de simple texte, en tableur Excel afin de triturer le code html.
Dans chaque cellule, le code html contient des balises html (plusieurs liens hypertextes, plusieurs images, etc. ...)
D'autre part, il peut y avoir des commentaires, sous la forme standard <!-- Ceci est un commentaire --> qu'il faudrait "oublier".
Comment m'y prendre, s'il vous plaît. Il me reste assez peu de cheveux !
Exemple pour travailler dessus : ce tableau fait 3 x 3. Je voudrais récupérer cela dans un tableau Excel similaire (3 * 3) avec juste le code html, tout le code html contenu dans chaque cellule et rien d'autre.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Récup code html d'un tabeau sur une page web dans Excel</title>
</head>
<body>
<table width="600" border="1" cellspacing="2" cellpadding="0">
<tr>
<!-- On ignore les commentaires -->
<td>Ce texte<sup><a title="Bulle d'information" href="#">*</a></sup> contient <font color="maroon"><strong>des balises</strong></font> html<sup><a title="Seconde bulle d'information" href="#">*</a></sup> comme un <a title="Google" href="https://google.fr" target="_blank">lien</a> et une image <img src="http://upload.wikimedia.org/wikipedia/fr/c/cf/Logo_Microsoft_Excel_2013.png" alt="Logo Excel" height="32" width="32" border="0">.</td>
<td>Ce texte<sup><a title="Bulle d'information" href="#">*</a></sup> contient <font color="maroon"><strong>des balises</strong></font> html<sup><a title="Seconde bulle d'information" href="#">*</a></sup> comme un <a title="Google" href="https://google.fr" target="_blank">lien</a> et une image <img src="http://upload.wikimedia.org/wikipedia/fr/c/cf/Logo_Microsoft_Excel_2013.png" alt="Logo Excel" height="32" width="32" border="0">.</td>
<td>Ce texte<sup><a title="Bulle d'information" href="#">*</a></sup> contient <font color="maroon"><strong>des balises</strong></font> html<sup><a title="Seconde bulle d'information" href="#">*</a></sup> comme un <a title="Google" href="https://google.fr" target="_blank">lien</a> et une image <img src="http://upload.wikimedia.org/wikipedia/fr/c/cf/Logo_Microsoft_Excel_2013.png" alt="Logo Excel" height="32" width="32" border="0">.</td>
</tr>
<tr><!-- Version du 10.02.2015 --><!-- Prochaine version prévue le 11.02.2015 -->
<td>Ce texte<sup><a title="Bulle d'information" href="#">*</a></sup> contient <font color="maroon"><strong>des balises</strong></font> html<sup><a title="Seconde bulle d'information" href="#">*</a></sup> comme un <a title="Google" href="https://google.fr" target="_blank">lien</a> et une image <img src="http://upload.wikimedia.org/wikipedia/fr/c/cf/Logo_Microsoft_Excel_2013.png" alt="Logo Excel" height="32" width="32" border="0">.</td>
<td>Ce texte<sup><a title="Bulle d'information" href="#">*</a></sup> contient <font color="maroon"><strong>des balises</strong></font> html<sup><a title="Seconde bulle d'information" href="#">*</a></sup> comme un <a title="Google" href="https://google.fr" target="_blank">lien</a> et une image <img src="http://upload.wikimedia.org/wikipedia/fr/c/cf/Logo_Microsoft_Excel_2013.png" alt="Logo Excel" height="32" width="32" border="0">.</td>
<td>Ce texte<sup><a title="Bulle d'information" href="#">*</a></sup> contient <font color="maroon"><strong>des balises</strong></font> html<sup><a title="Seconde bulle d'information" href="#">*</a></sup> comme un <a title="Google" href="https://google.fr" target="_blank">lien</a> et une image <img src="http://upload.wikimedia.org/wikipedia/fr/c/cf/Logo_Microsoft_Excel_2013.png" alt="Logo Excel" height="32" width="32" border="0">.</td>
</tr>
<tr>
<td>Ce texte<sup><a title="Bulle d'information" href="#">*</a></sup> contient <font color="maroon"><strong>des balises</strong></font> html<sup><a title="Seconde bulle d'information" href="#">*</a></sup> comme un <a title="Google" href="https://google.fr" target="_blank">lien</a> et une image <img src="http://upload.wikimedia.org/wikipedia/fr/c/cf/Logo_Microsoft_Excel_2013.png" alt="Logo Excel" height="32" width="32" border="0">.</td>
<!-- Prochaine version prévue le 12.02.2015 -->
<td>Ce texte<sup><a title="Bulle d'information" href="#">*</a></sup> contient <font color="maroon"><strong>des balises</strong></font> html<sup><a title="Seconde bulle d'information" href="#">*</a></sup> comme un <a title="Google" href="https://google.fr" target="_blank">lien</a> et une image <img src="http://upload.wikimedia.org/wikipedia/fr/c/cf/Logo_Microsoft_Excel_2013.png" alt="Logo Excel" height="32" width="32" border="0">.</td>
<td>Ce texte<sup><a title="Bulle d'information" href="#">*</a></sup> contient <font color="maroon"><strong>des balises</strong></font> html<sup><a title="Seconde bulle d'information" href="#">*</a></sup> comme un <a title="Google" href="https://google.fr" target="_blank">lien</a> et une image <img src="http://upload.wikimedia.org/wikipedia/fr/c/cf/Logo_Microsoft_Excel_2013.png" alt="Logo Excel" height="32" width="32" border="0">.</td>
</tr>
</table>
</body>
</html>
Cordialement
Dernière édition: