- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to Convert an Excel Sheet or Cells to an HTML Table?
Have you ever faced a situation where you needed to create an HTML table for a range of cells or a whole worksheet? Developers in webpages use HTML tables to arrange data in tables. In this article, we'll look at how to convert an Excel sheet or cell into an HTML table. This procedure can be completed using one of two methods: the first is to use "save as," and the second is to use the formulas.
Converting a Sheet or Cells to an HTML Table Using "Save As"
Here, we'll resave the sheet with the save as command and then change the format to Excel. Let's go over a simple procedure for converting a sheet or cells to an HTML table in Excel using Save As.
Let us consider any Excel table that you want to convert into an HTML table.
Then click on file, click on save as, and select Browse, as shown in the following screenshot.
File > Save as > Browse
Then, in the pop-up window, select the web page from the list.
Then click on the selected sheet or whole workbook, click on save to open the publish page, then click on change, type your title, click OK, and click on publish to complete our proces
Converting a Sheet or Cells to HTML Table Using Formulas
Here we will add the HTML tags into the sheet and then use the & operator to join the cells. Let's go over a simple procedure for converting sheets or cells to an HTML table using formulas.
Let us consider the same data that we used in the above example, as shown in the below image.
Now click on the cell C1 and enter the data in the sheet as shown in the below image.
Then click on the empty cell (in our case, cell G1) and enter the formula as, "=C1&D1&A1&E1&D1&B1&E1&F1"and press the Enter button.
Then drag‑down using the auto-fill handle to fill all the cells.
Select the new values and copy them using the keyboard shortcuts CTRL + C. Now click on an empty cell, click on "Paste," and then select "Paste as values."
Finally, add <table><tbody> at the top of values and </tbody></table> at the bottom of values to complete our HTML table, as shown in the following screenshot.
In this tutorial, we used a simple example to demonstrate how you convert an Excel sheet or cells to an HTML table in Excel.
Kickstart Your Career
Get certified by completing the courseGet Started