How to Convert an Excel Sheet to an HTML Table

Mehvish Mushtaq is a computer engineer by degree. Her love for Android and gadgets led her to develop the first Android app for Kashmir. Known as Dial Kashmir, she won the prestigious Nari Shakti award from the President of India. She has been writing about technology for 6+ years and her favorite categories include how-to guides, explainers, tips and tricks for Android, iOS/iPadOS, social media, and web apps.

Afam has been a content writer with Guiding Tech Media since August 2023. However, his experience in tech writing dates back to 2018, when he worked as a freelance writer for Make Tech Easier. Over the years, he has grown a reputation for publishing quality guides, reviews, tips, and explainer articles. His work is featured on top websites, including Technical Ustad, Windows Report, and Next of Windows. He has training as a Microsoft Certified Professional and has covered more Microsoft-related guides on these platforms.

Method 1: Save as Webpage

Excel lets you saveyour 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 try to convert a simple table. You can remove those extra lines if you are familiar with HTML coding.

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

Step 1:Launch theExcel sheetthat you want to convert.

Step 2:Click theFileoption at the top and chooseSave As. Select the folder where you want to save the generated HTML file.

Step 3:The Save As dialog box will open. Click on theSave as type drop-downbox > chooseWeb page.

Step 4:If you have multiple worksheets, chooseEntire Workbooknext to the Save option. If it’s a simple table, selectSelection> click onSave.

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

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 chooseOpen with. If your HTML editor is installed on your PC, select it, or choose any regular text editor, such as Notepad or its alternatives.

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

Method 2: Use HTML Editor

One of the simplest methods is to copy the cells from your Excel sheet and paste them into an HTML editor. That will automatically generate the required code for the HTML table. In this example, we use theonline HTML editor.

Step 1:Open your Excel sheet. Copy the cells containing your data. Use theCtrl+Ckeyboard shortcut to copy the cells.

Step 2:Open any HTML editor and paste the copied cells into the box on the left side.

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.

Method 3: Using Google Sheets Publish to Web Feature

This will entail opening the Excel file with Google Sheets. Follow the steps below.

Step 1:Open yourGoogle Driveon a browser.

Step 2:Navigate to where you saved the Excel file on your computer and drag and drop it into any location on your Google Drive.

Step 3:Click on theFilein your Drive, expandOpen with, and selectGoogle Sheets.

Step 4:Click onFile>Share>Publish to web.

Step 5:ClickPublish,then copy the link.

Step 6:Paste the link in your browser and clickEnter.

Step 7:Right-click the page > clickInspect.

Step 8:In the new window, expand tags till you findTable> right-click and selectCopy>Copy element.

Now, you may paste the HTML table code into any editor.

Was this helpful?

Last updated on 28 May, 2024

Leave a ReplyCancel reply

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

Name*

Email*

Comment*

Δ

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.

More in Internet and Social

4 Fixes for Google Search Suggestions Not Showing in Safari on Mac

JOIN THE NEWSLETTER

Get Guiding Tech articles delivered to your inbox.

© 2024 Guiding Tech Media. All Rights Reserved.