How To Convert Excel Table To Html Code

In this article, I will tell you 2 methods to convert an Excel table or cells region to an HTML source code.

1. How To Use Formula To Convert Excel Cells Region To HTML Code.

  1. In this example, there are 2 columns.
  2. The first column saves the user name and the second column saves the user’s email address.
  3. Input the Html table elements in cells C1, D1, E1, and F1.
  4. Select cell range C1:F1, and then drag down the small square on the bottom right corner of the region to the last row to auto-fill the row data.
  5. Input the formula =C1&D1&A1&E1&D1&B1&E1&F1 in cell G1 and press Enter key, then you can find the Html table source code in cell G1.
  6. Autofill the other cells’ data in column G by dragging the small green square on the bottom right corner of cell G1.
  7. Select cell G1, press the Shift key, and click cell G3 to select cells G1:G3.
  8. Press Ctrl + C to copy the HTML source code in cells G1:G3.
  9. Then you can press Ctrl + V to paste the above HTML source code to the HTML editor.
  10. Below is the example Excel cell data.

2. How To Convert Excel Table To HTML code Manually.

  1. Select the cells that you want to convert to an HTML table.
  2. Click the File tab, then click the Save As menu item.

2.1 Convert To Html File On macOS.

  1. If you use Excel on macOS, then you can select the item Web Page (.htm) from the File Format drop-down list.
  2. Then it will display 3 radio buttons below the above list, they are Workbook, Sheet, and Selection:$A$2:$B$3.
  3. Click the Web Options… button to open the web options dialog window.
  4. You can input the web page title and keywords in the web options window.
  5. Click the Save button to convert the selected cells into an HTML file.

2.2 Convert To Html File On Windows.

  1. If you use Excel on Windows, you can click the Browse item to browse a folder where you want to save the HTML file.
  2. Select Web Page from the Save as type drop-down list.
  3. Input the HTML file name in the File name input text box.
  4. If you just want to convert the selected cells, then check the radio button Selection:$A$2:$B$3.
  5. If you want to convert the entire workbook, you can check the radio button Entire Workbook.
  6. Click the Save button will open the Publish as Web Page dialog window.
  7. You can change the title in this window by clicking the Change… button.
  8. You can check the checkbox AutoRepublish every time this workbook is saved to auto-regenerate the HTML file.
  9. You can also check the checkbox Open published web page in browser to open the HTML file in a web browser after publishing it.
  10. Click the Publish button to generate the HTML file.
  11. Then you can open the generated HTML file to get the converted HTML source code.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.