Conversion Excel en html simple
Source : Convert an Excel Table To Simple HTML
PC Magazine, July, 2002 by Neil J. Rubenking
Question : "In Excel 2000, is there any easy way to save a block of rows and columns as a simple HTML table? I regularly get Excel spreadsheets that I need to publish to the Web, but I don't want all the extra formatting junk that Microsoft embeds to make the file specific to Internet Explorer. I just want the basic HTML, which I'll adjust in my Web editor."
Réponse : "When you save a workbook as HTML, Excel does indeed dump in a load of extra formatting. I don't see any way to avoid that, but you can create your unformatted table in a few simple steps :
- Save the Excel file as tab-delimited text, and load the resulting file into Word.
- Search for tab (^t) and replace each occurrence with </td><td>.
- Search for end-of-line (^p) and replace each instance with </td></tr>^p<tr><td>.
- You now have an extra on a blank line at the bottom, and the same text missing at the start of the very first line. Move the extra text to the beginning of the first line. Add the tag at the top and at the end and you're ready to copy the document into your HTML page."
Testé et approuvé ! On peut se créer une petite macro word et compléter éventuellement par un remplacement des <td></td> en <td> </td>.
Ajouter un commentaire