How to convert Excel tables to HTML

If you created a pretty Excel table and now want to publish it online as a web page, the simplest way is to export it to an old good html file. In this article, we are going to explore several ways of converting Excel data to HTML, determine pros and cons of each, and walk you through the conversion process step-by-step.

Convert Excel tables to HTML using "Save as Web Page" option

Using this method you can save an entire workbook or any portion of it, such as a selected range of cells or chart, to a static web page (.htm or .html) so that anyone can view your Excel data on the web.

For example, you have created a feature-rich report in Excel and now want to export all the figures along with a pivot table and chart to your company's web-site, so that your workmates can view it online in their web-browsers without opening Excel. The original Excel table to be converted to an HTML file

To convert your Excel data to HTML, perform the following steps. These instructions apply to all "ribboned" versions of Excel 2007 - 365:

  1. On the workbook, go to the File tab and click Save As.

    If you want to export some portion of data only, e.g. a range of cells, pivot table or graph, select it first.

  2. In the Save As dialog, choose one of the following:
    • Web Page (.htm; .html). This will save your workbook or the selection to a web page and create a supporting folder that will store all of the page's supporting files such as images, bullets and background textures.
    • Single File Web Page (.mht; .mhl). This will save your workbook or the selection to a single file with supporting files embedded into the web page.
    Saving an Excel worksheet as a webpage
  3. If you selected a range of cells, a table or a chart before clicking Save as, then select the Selection radio button, click Save and you are close to finished. Saving the selected part of an Excel workbook as web page

    If you have not selected anything yet, continue with the following steps.

    • To save the entire workbook, including all the worksheets, graphics and tabs for navigating between sheets, select Entire Workbook.
    • To save the current worksheet, choose Selection: Sheet. In the next step you will be given a choice whether to publish the whole worksheet or some of the items.
    Save the entire workbook or the selection.

    You can also set a title for your web-page now by clicking the Change Title... button in the right-hand part of the dialog window. You will also be able to set or change it later, as described in step 6 below.

  4. Click the Publish button and this will open the Publish as Web Page dialog window. Let's briefly go through each of the available options, from top to bottom.
  5. Items to publish. Here you choose what portion(s) of your Excel workbook you want to export to a web-page.

    In the drop-down list next to Choose, you have the following choices:

    • Entire workbook. The whole workbook will be published, including all of the worksheets and tabs to navigate between sheets.
    • Entire worksheet or certain items on a worksheet, such as pivot tables, charts, filtered ranges and External data ranges. You select "Items on SheetName", and then choose either "All contents" or particular items. Choose whether to publish the entire worksheet or certain items.
    • Ranges of cells. Select Range of cells in the drop-down list and then click the Collapse Dialog icon to select the cells you want to publish.
    • Previously published items. Select this option if you want to republish a worksheet or items you have already published. If you'd rather not republish a certain item, select the item in the list and click the Remove button.
  6. Title of the web-page. To add a title that will be displayed in the title bar of the browser, click the Change button next to Title: and type in the title you want. Adding a web-page's title
  7. Click the Browse button next to File name and choose the hard drive, folder, web folder, web server, HTTP site, or FTP location where you want to save your web page.

    Tips: If you are converting an Excel workbook to an HML file for the first time, it makes sense to save the web page onto your local hard drive first so that you can make the needed corrections before publishing the page on the web or your local network.
    You can also choose to export your Excel file to an existing web page provided that you have permissions to modify it. In this case, upon clicking the Publish button, you will see a message prompting you to choose whether you want to overwrite the content of the existing web-page or append your data to the end of the web page. If the former, click Replace; if the latter, click Add to file.

  8. Select "AutoRepublish every time this workbook is saved" if you want to have the workbook or selected items automatically republished after each saving of the workbook. I'll explain the AutoRepublish feature in more detail further on in the article.
  9. Select the "Open published Web page in browser" check box in case you want to view the web page right after saving.
  10. Click the Publish button and you are done!

    As you can see in the screenshot below, our Excel table looks fairly nice online, though the design of the original Excel file is a bit distorted. An Excel table published as a web page

    Note: The HTML code created by Excel is not very clean and if you are converting a large spreadsheet with a sophisticated design, it may be a good idea to use some HTML editor to clean up the code before publishing so that it will load more quickly onto your web site.

5 things you should be aware of when converting an Excel file to HTML

When you use Excel's Save as Web Page function, it is important that you understand how its main features work in order to avoid most typical mistakes and prevent common error messages. This section provides a quick overview of the options you should pay special attention to when exporting your Excel spreadsheet to HTML.

  1. Making changes and re-saving a Web page

    In theory, you can save your Excel workbook as a Web page, then open the resulting web page in Excel, make edits and re-save the file. However, in this case some Excel features will no longer be working. For example, any charts contained in your workbook will become separate images and you won't be able to modify them in Excel as usual.

    So, the best practice is to maintain your original Excel workbook up to date, make changes in the workbook, always save it as a workbook (.xlsx) first and then save as a Web page file (.htm or .html).

  2. AutoRepublishing a Web page

    If you selected the AutoRepublish checkbox in the Publish As Web Page dialog discussed in step 8 above, then your web page will get updated automatically every time you save your Excel workbook. This is a really helpful option that lets you always maintain an up-to-date online copy of your Excel table.

    If you have turned on the AutoRepublish feature, a message will appear each time you save the workbook asking you to confirm whether you want to enable or disable AutoRepublish. If you want to have your Excel spreadsheet republished automatically, then naturally select Enable... and click OK. Enabling the AutoRepublish feature

    However, there are some circumstances when you may not want to republish your spreadsheet or selected items automatically, e.g. if your Excel file contains confidential info or has been edited by someone who is not a trusted source. In this case, you can make AutoRepublish temporarily or permanently unavailable.

    To temporarily disable AutoRepublish, select the first option "Disable the AutoRepublish feature while this workbook is open" in the above-mentioned message. This will turn off auto-republishing for the current session, but it will be enabled again the next time you open the workbook.

    To permanently disable AutoRepublish for all or selected items, open your Excel workbook, choose to save it as Web page and then click the Publish button. In the Choose list, under "Items to publish", select the item you do not want to republish and click the Remove button. Permanently disabling the AutoRepublish feature

  3. Excel features not supported in web pages

    Regrettably, a couple of very useful and popular Excel features are not supported when you convert your Excel worksheets to HTML:

    • Conditional formatting is not supported when saving an Excel spreadsheet as a Single File Web Page (.mht, .mhtml), so make sure you save it in the Web Page (.htm, .html) format instead. Data bars, color scales, and icon sets are not supported in either web page format.
    • Rotated or vertical text in not supported either when you export Excel data online as a Web page. Any rotated or vertical text in your workbook will be converted to horizontal text.
  4. Most common issues when converting Excel files to HTML

    When converting your Excel workbook to a web page, you may run into the following known issues:

    • Cell's content (text) is truncated or not completely displayed. To prevent text from being cut off, you can either turn off the wrapped text option, or shorten the text, or widen the column width, also make sure the text is aligned to the left.
    • The items you save to an existing Web page always appear at the bottom of the page while you want them at the top or in the middle of the page. This is a normal behavior when you choose to save your Excel file as an existing web page. To move your Excel data to another position, either edit the resulting web-page in some HTML editor or rearrange the items in your Excel workbook and save it as a web page anew.
    • Links on the web page are broken. The most obvious reason is that you have moved either the web page or the supporting folder to another location. See supporting files and hyperlinks for more details.
    • A red cross (X) is displayed on the Web page. A red X indicates a missing image or other graphic. It may get broken for the same reason as hyperlinks. Just make sure you always keep the web-page and supporting folder in the same location.

Excel to HTML converters

If you often need to export your Excel tables to HTML, the standard Excel means we have just covered may seem a bit too long way. A faster method is to use an Excel to HTML converter, either online or desktop. There are a handful of online converters on the Internet both free and paid and we are going to try a few right now.

TABLEIZER - free and simple Excel to HTML online converter

TABLEIZER is a one-click online converter that handles simple Excel tables with ease. All you need to do is to paste the contents of your Excel table to the window and click the Tableize It! button. Some basic formatting options such as font size, font type, header color, and even CSS styles are available. TABLEIZER - free and simple Excel to HTML online converter

After that you just copy the HTML code generated by the Tableizer converter and paste it to your webpage. The best thing when using this tool (apart from speed, simplicity and no cost : ) is the preview window that shows how your Excel table is going to look like online.

However, the formatting of your original Excel table will not be automatically converted to HTML as you see in the screenshot below, which is a very significant drawback in my judgment. An Excel table converted with Tableizer

Advanced Excel to HTML converter (paid)

Unlike the two previous tools, the SpreadsheetConverter works as an Excel add-in and requires installation. I've downloaded a trial version (as you understand from the heading, this is commercial software) to see if it is in any respect better than either free online converter we've just experimented with.

I must say I was impressed! The conversion process is as easy as clicking the Convert button on the Excel ribbon. The SpreadsheetConverter button on the Excel ribbon

And here is the result - as you can see, the Excel table exported to a web-page looks very close to the source data: An Excel table exported to a web-page with Spreadsheet Converter

For the sake of experiment, I've also tried to convert a more complex workbook containing several sheets, a pivot table and a chart (the one we saved as web page in Excel in the first part of the article) but to my disappointment the result was much inferior to what Microsoft Excel produced. Maybe this is just because of the trial version's limitations.

Anyway, if you are willing to explore all the capabilities of this Excel to HTML converter, you can download an evaluation version of the SpreadsheetConverter add-in here.

Excel web viewers

If you are not happy with the performance of Excel to HTML converters and are looking for alternatives, some web viewer may work a treat. Below you will find a quick overview of several Excel Web Viewers so that you can get a feel of what they are capable of.

Zoho Sheet online viewer allows viewing Excel spreadsheets online by either uploading a file or entering the URL. It also provide an option to create and manage Excel spreadsheets online.

This is probably one of the most powerful free online Excel viewers. It supports some basic formulas, formats and conditional formatting, allows you to sort and filter the data and convert it to a number of popular formats such as .xlsx, .xls, .ods, .csv, .pdf, .html and others, as you see in the screenshot below. An Excel table in the Zoho Sheet online viewer

Its main weakness is that it does not keep the format of the original Excel file. I also have to admit that Zoho Sheet web viewer was not able to cope with a sophisticated spreadsheet containing a custom table style, complex formulas and a pivot table.

Well, we have explored a few options to convert Excel spreadsheets to HTML. Hopefully, this will help you choose the technique in accordance with your priorities - speed, cost or quality? The choice is always yours : )

In the next article we are going to continue this topic and investigate how you can move your Excel data online using Excel Web App.

45 comments

  1. Copy paste from excel to hdmi system

    I'm not that good at English so I used google translate. I have an excel sheet where in a1, b1 etc. A text is formed from several parts in the excel sheet ="● from "&TEXT(DATE(MIDDLE(A40; 7; 4); MID(A40; 4; 2); LEFT(A40; 2));" Dddd ")&"the"&TEXT(DATE(MIDDLE(A40; 7; 4); MID(A40; 4; 2); LEFT(A40; 2));" D. MMMM YYYY") & "to "& TEXT(DATE(MIDDLE(B40; 7; 4); MID(B40; 4; 2); LEFT(B40; 2));" Dddd ")&"the"&TEXT(DATE(MIDDLE(B40; 7; 4); MID(B40; 4; 2); LEFT(B40; 2));" D. MMMM YYYY") &" have you worked "&MID(I16; 1; FIND(":"; I16)-1)&" hours and "&MID(I16; FIND(":"; I16)+1; LENGTH(I16))&" minutes" & "and took leave in "&MIDT(K16; 1; FIND(":"; K16)-1)&" hours and "&MID(K16; FIND(":"; K16)+1; LENGTH(K16))& "minutes" When I copy the rows in excel and put them in an htlm-based subject system, the text is inserted without line breaks. If I insert the same rows from the same sheet with Power Automate, line breaks are set.

    When I copy the rows in excel and put them in an htlm-based subject system, the text is inserted without line breaks. If I insert the same rows from the same sheet with Power Automate, line breaks are set. I only use power automate if there are more than 10 lines, as I can't get power automate to place the text correctly in the course system, so it's faster to make line breaks than to correct the text. I have tried with char (10) and much more without success. If anyone can help I will be very happy.

  2. Hello!

    I want to export excel into a website.
    For this, i wanted to export excel into online webpage.

    I tried the method but the excel is updating in every few minutes.
    and i wanted to make online updates in online excel.

    Please specify any answer

    1. Same prblm

  3. On Excel 2016: In your picture below point 5: I don't have the option to
    Auto Republish every time this workbook is saved
    Is there something I have to do to the settings in Excel 2016

  4. Great Article! This blog is useful for every.

  5. What is your opinion on Adobe converter .

  6. Hi, i want to editable one cell for one cell but i not able to edit one cell in web page after save as file as web page. I am using Excel 2013

  7. Hi,
    I have Excel 97 to 2003 On My Pc
    I want to Convert Excel With Formula Into A Webpage , Where My Customer Can Go And Use This Sheet.
    I Tried Google Docs And Microsoft Cloud Already But I Am Not Satisfied With The Interface As Its Unfriendly To Use On Cell Phone

    Please Show Me An Alternative ..

    Thx

  8. saving an excel worksheet as a web page no longer works. I get a message saying" excel has stopped working and will shut down any ideas on how to fix? Can you send any solutions to me in an email? Thanks

  9. Hi All
    We are using macros code to generate reports in excel. Our Macros code is very big, complex. It runs for approx 4-5 minutes and the displays the results in graphical form.
    There are different menu icon on grah page, for example, Zone1, Zone2, Zone3 etc. A new graph window is open , once you click on the Zone1. This new graoh also have some options, like date, time.
    So my question is everday we have to send email with execl to many people. I have a requirement, that can i display all these output in webpage, instead of excel. My supervisor wants all data to be access in webpage.
    Please help me and tell me, what is the soltin, and how i can do that.

    Thanks
    Nishant

  10. my problem is my diagonal header became vertical just like yours. is there any possibilities to be rotated as diagonal so that my header is still the same.

  11. Thank you very much I think these knowledge will be more helpful to me.

  12. Thank you so much! This helped me tons! Thumbs up!;)

  13. Will my spreadsheet info be able to be sorted by using the filter function by any column on the website once it is uploaded?
    Thank You
    Steve U

  14. I converted the xl sheet to web page and turned on the auto republish option, I added some css to the webpage but whenever I am editing the xl its giving me new webapge and all of my css gone.. how can I do it so that my css remains there and data which i put remains there with the css thanks in advance.

  15. Its helpful information . It is working fine . Now if I publish the data in HTML and user want to search his/her data using his user id instead of using Ctrl F in one input box . How I can create input box option . I know how to create in excel and it's formula . But when I am converting it into HTML that input box is not working . User is not able to key his id .

  16. Thanks very useful site. I have one doubt.

    My excel sheet has cells (where i input data) and cells where formulas are entered to show the output. Can I convert that sheet into a interactive webpage like input form fields and outputs.

  17. Hello,

    I'm interested to find some tool that will enable me consistently and easily convert the excel configuration to web page, that web page should let me export it to PDF or word doc.
    I was working with SpreadsheetConverter, trying to reach what i need and we were very closed but the last part was missing, the way of the pdf output wasn't satisfy and we couldn't copy-paste it to some other page in a suitable manner or look&feel, and that is important stuff for us.
    any suggestions?
    thanks
    Avital

  18. I use the "save as" webpage option to post to my company's intranet. But lately when we are on the step of saving as a webpage after saving the excel file we are getting the message as the .htm is in use. The person who it claims is using it we have had log off their computer because they don't have the file open. But still no one can save as a webpage. No problem updating the file as the excel spreadsheet and resaving but just not able to save as a .htm file.

  19. Hi,
    i tried to converted formulated table in to html but when it is converted my formulas are not working,can anyone tell me i can get access to this?

  20. I'm wanting to regularly re-publish what is currently a small worksheet as a html page with a javascript plugin or my own javascript to make a filter and search feature. So need either the plain html table without junk, i.e. html tags only, or output as xml so I can make the required xslt. Seems like need to create some silly xml mapping for excel to spit out xml. The whole process will have to become semi-automated, so I'm wary of online copy-paste operations that are more suitable for one of things. Excel plugins are out of the question.
    I need to make the process simple and tech dummy proof as well.

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)