3 Best Ways to Convert Excel Sheet to HTML Table

I was recently working on a simple Excel sheet that I needed to add as a table on a webpage. The first thought that crossed my mind was to manually write the HTML code for the data table in the sheet. While you can do that, it’s quite tedious and time-consuming. Why waste so much energy when you can achieve that in a minute or two? Let’s check 3 easy methods to convert Excel cells to HTML table format.

Excel to html fi2

To display spreadsheet data in an HTML table, you can use the native feature in Excel to convert sheets to webpages. If the generated code doesn’t seem clean, you can either try HTML editors online or use dedicated online tools to convert Excel sheets to HTML.

Let’s get started on converting Excel sheets to HTML tables that you can add on websites.

1. Use HTML Editor

The simplest method is to copy the cells from your Excel sheet and paste them in an HTML editor. That will automatically generate the required code for the HTML table. Here are the steps in detail:

Step 1: Open your Excel sheet. Copy the cells containing your data. Use the Ctrl + C keyboard shortcut to copy the cells.

Excel to html 1

Step 2: Now open any HTML editor. You can use the online HTML editors too. I can recommend https://html-online.com/editor/ for now. Open it and paste the copied cells in the box on the left side.

Excel to html 4

Immediately when you paste it, the editor will generate your HTML code for the table. It will be a basic table. You can format it later as per your requirements.

Excel to html 3

Tip: Find out how to convert text to a table in Microsoft Word.

2. Save as Webpage

Excel lets you save your documents in different formats. One of them is an HTML webpage. You can use this feature to convert an Excel sheet to an HTML document. However, that adds a lot of extra code which might be unnecessary if you are trying to convert a simple table. If you are familiar with HTML coding, you can remove those extra lines.

Here are the steps to convert Excel to HTML using save as webpage:

Step 1: Launch the Excel sheet that you want to convert.

Step 2: Click on the File option at the top and choose Save As. Select the folder where you want to save the generated HTML file.

Excel to html 5

Step 3: The Save As dialog box will open. Click on the Save as type drop-down box and choose Web page.

Excel to html 6

Step 4: If you have multiple worksheets choose Entire Workbook next to the Save option. If it’s a simple table, select Selection. Click on Save

Excel to html 7

Step 5: Another pop-up window will open. Click on Publish.

Excel to html 8

The file will be saved as an HTML page. To view its code, follow the instructions given below.

View HTML Code for a Webpage

Navigate to the folder where you saved the HTML file. Then, double-click on it to preview the file in a browser.

To copy the HTML code, right-click on the file and choose Open with. Select your HTML editor if it’s installed on your PC or choose any regular text editor such as Notepad or its alternatives.

Excel to html 9

Here’s a snapshot of how the HTML code looks like using this method:

Excel to html 10

3. Use Online Tools to Convert Excel to HTML Table

Various online tools exist that let you convert your Excel documents to HTML. You need to add your Excel sheet, and they will show the HTML code. There are two websites that I like. Let’s check the steps for both of them.

Method 1: Using Conversion Tools

Step 1: Launch https://conversiontools.io/convert/excel-to-html on your browser.

Step 2: Using the Browse button, navigate to the Excel document that you want to convert. Alternatively, you can drag and drop the file as well.

Excel to html 11

Step 3: The Run Conversion button will activate. Click on it to begin the conversion process.

Excel to html 12

Step 4: Click on Download File to download it on your computer.

Excel to html 13

To view the downloaded file’s HTML code, follow the steps mentioned above for ‘View code for a webpage’ section. To reiterate, open the page in a regular text editor to view its code.

Method 2: Using Beautify Tools

This website generates a cleaner code as compared to the above one. You will get a basic table with this one.

Here’s how to go about it.

Step 1: Open http://beautifytools.com/excel-to-html-converter.php page in the browser.

Step 2: Click on the Browse button. Select the file that you want to convert.

Excel to html 14

The generated HTML code will display in the box below. You can either copy-paste it or click on the Download button to save it as a TXT file.

Excel to html 15

Learn HTML

It’s quite easy to convert your sheets to HTML tables automatically. Some of the methods may add extra code that can be removed easily. If you are new to HTML, check W3Schools.com for tips on using HTML.

Next up: Online HTML editors are a great alternative to apps. Find out the best and free online HTML editors from the next link.

Was this helpful?

Thanks for your feedback!

Last updated on 02 February, 2022

The article above may contain affiliate links which help support Guiding Tech. The content remains unbiased and authentic and will never affect our editorial integrity.