How to Create an HTML Table with Excel

If you write something for a webpage, chances are that you write the text in HTML code. If you’re used to it, it often turns out to be easier than writing the text in a What-you-see-is-what-you-get-editor (WYSIWYG). In my experience, the WYSIWYG-editors never really work the way you want, so the HTML editor turns out to be better after all.

But what if you want to use a table that you have created in Excel? How can you transform an Excel table into a piece of HTML code that looks like this?

If you search for “HTML table from Excel” or “Excel to HTML table”, most sites will recommend that you save your Excel spreadsheet as Web Page. That will convert it into an HTML document that you can edit in your HTML editor. Another way is to use some software for the purpose.

This third way is easier: Use the CONCATENATE function or the “&” operator to create the HTML table right there in Excel, next to the table.

EasyExcel_22_1_Create HTML table in Excel

Here’s how to do it: As we saw above, a simple HTML table is made with certain tags. The trick is to add these tags next to our Excel table (column C, D, E and F).

Now, to create an HTML table row, we’ll concatenate the different items in the right order. You can either use the “&” operator or the CONCATENATE function:

=C2&E2&A2&F2&E2&B2&F2&D2

=CONCATENATE(C2,E2,A2,F2,E2,B2,F2,D2)

EasyExcel_22_2_Create HTML table in Excel

Copy the formula down. Copy the HTML column and paste it into your HTML editor:


EasyExcel_22_3_Create HTML table in Excel

This is what it might look like in your HTML editor:

…and this is what it might look like on a web page (depending on the CSS code/stylesheet):

Other easy tricks:

Are you using a non-English version of Excel? Click here for translations of the 140 most common functions in 17 different languages:

Catalan
Czech
Danish
Dutch
Finnish
French
Galician
German
Hungarian
Italian
Norwegian
Polish
Portuguese (Brazilian)
Portuguese (European)
Russian
Spanish
Swedish
Turkish

1 thought on “How to Create an HTML Table with Excel

Leave a Reply to RZRWOLF Cancel reply

Your email address will not be published. Required fields are marked *


three × = 15