Skip to main content
 

How to convert Excel sheet or cells to html table?

Author: Sun Last Modified: 2024-09-05

Supposing you have a range of cells, and you want to convert the range of cells to an html table as below screenshot shown, how can you quickly handle it? In this article, I introduce some tricks to help you easily convert a sheet or a range of cells to html table in Excel.


arrow blue right bubble Convert cells to html table with Save As command

In Excel, you can use Save As command to quickly convert a range of cells or the whole workbook to html table.

1. Select the cells you want to convert, and click File > Save As > Browse to show the Save As window. See screenshot:
click File > Save As > Browse

2. In the Save As window, specify a folder you are going to place the html table, type the file name you use, and then select Web Page from Save as type drop down list. Then you can choose to save the workbook or only selection to the html table by checking Entire Workbook or Selection option. See screenshot:
specify the settings in the Save As window

3. Click Save, a Publish as Web Page dialog pops out, and you can click Change to specify the title, if you want to auto update and republish the html table every time, check AutoRepublish every time this workbook is saved, and if you want to auto open this web page after saving, check Open published web page in browser. See screenshot:
click Change to specify the title

4. Click Publish to finish the saving.
Click Publish to finish the saving


arrow blue right bubble Convert cells to html table with Kutools for Excel

If you have Kutools for Excel – a handy Excel tool, you can apply its Export Range to File utility to quickly convert Excel cells to html table/ pdf table/Unicode text table and so on as you need.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Enhanced with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

After free installing Kutools for Excel, please do as below:

1. Select the cell range you want to use, and click Enterprise > Import/Export > Export Range to File. See screenshot:
click Export Range to File feature of kutools

2. In the Export Range to File dialog, check Simple HTML or Complex HTML (all formatting) option as you need, and then specify an exporting destination you want. See screenshot:

Tip:

Simple HTML: The selected range is exported with grid lines, and the following options can be reserved in the exported file: background color, font name, font size, font color, bold italic, column widths and horizontal alignment.

Complex HTML: All formats of the selected range will be kept in the final file.
check Simple HTML or Complex HTML (all formatting) option in the dialog box

3. Click Ok, and a dialog pops out to remind you to name the exported file, in default it was named with the cell ranges, change it as you need.
type a name for the new file

4. Click Ok, and the range has been converted to html table.
the range has been converted to html table


arrow blue right bubble Convert cells to html table with formulas

If you want to convert cells to html table format and copy it to an html editor as below screenshot shown, you can do as below steps:
 copy the data to an html editor

1. Enter these texts to a range of cells as below screenshot shown:
Enter the table html to a range of cells

2. Then go to next cell, here is H1, and enter this formula =D1&E1&A1&F1&E1&B1&F1&E1&C1&F1&G1, press Enter, and then drag down the formula to the cell you need.
enter a formula and drag it to other cells

3. Then copy these formula cells and pasted them as value in another location. Select formula cells and press Ctrl + C and select a blank cell, J1 and right click to select Paste as Value option in the context menu. See screenshot:
copy these formula cells and pasted them as value

4. Then you can copy the cell range to the html editor, and enter table tbody and /tbody /table separately into the beginning and the end of the string range. See screenshot:
copy the cell range to the html editor

Now the Excel cells have been converted to an html table.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!