How to Convert Excel Tables to HTML

If you’ve created a pretty spreadsheet in Excel and now want to publish it as a web page, then the easiest way to do that is to export it to a good old HTML file. In this article, we will look at several ways to convert data from Excel to HTML, determine the pros and cons of each method, and perform such a conversion with you step by step.

Converting Excel Spreadsheets to HTML Using the Save As Web Page Tool

In this way, you can save the entire workbook or any part of it (for example, a selected range of cells, a graph, etc.) as a static web page (.htm or .html), so that anyone can view this data on the Internet.

Let’s say you’ve created a rich report in Excel and now you want to export all this information, along with a chart and a pivot table, to a company website so that colleagues can see it online through web browsers without having to launch Excel.

Follow the steps below to convert Excel data to HTML. These instructions apply to Excel 2013, 2010, and 2007.

  1. In an Excel workbook, open the tab Fillet (File) and click Save As (Save As). If you want to export only part of the data (for example, a range of cells, a pivot table, or a chart), select this part first.
  2. In the dialog box thesise As (Save As) select one of the options:
    • Web Page (Web page) – this way you save the workbook or selected data as a web page and additionally create a folder in which all auxiliary files will be stored for the correct display of the web page (pictures, buttons and textures for the background).
    • Single File Web Page (Web page in one file) – this way you save the workbook or selected data in one file, all supporting files will be embedded in the web page.

    How to Convert Excel Tables to HTML

  3. If before pressing Save as (Save as) You have selected a range of cells, a table or a chart, then enable the option Selection (highlighted) and press Save (Save). Almost done!How to Convert Excel Tables to HTMLIf you have not selected anything beforehand, do the following:
    • To save the entire workbook, including all sheets, charts, and sheet navigation tabs, select Entire Workbook (Entire book).
    • To save only the current sheet, select the option Selection: Sheet (Emphasis: List). In the next step, you will be asked to choose whether to publish the entire sheet or only some of its elements.

    How to Convert Excel Tables to HTML

    You can name the web page by clicking the button Change Title (Edit) on the right side of the dialog box. You will also have the option to set or change the title a little later, this is described further in step 6.

  4. Нажмите кнопку Publish (Publish) – a dialog box will open Publish as Web Page (Web page publishing). Next, we will briefly explain all the parameters from start to finish.
  5. Item to publish (Published items). Here you choose which parts of the Excel workbook you want to export to a web page. In drop down list Choose (Select) there are the following options:
    • Entire workbook (Entire book) – The entire book will be published, including all its sheets and tabs for navigating between sheets.
    • Items on … (Items from…) – the entire sheet or specific elements of it, i.e. pivot tables, charts, filtered ranges, and so on, will be published. First you choose Items on … (Items from…) and then either All contents (All content), or the desired elements.How to Convert Excel Tables to HTML
    • Ranges of cells (Cell Range) – Select this option from the drop-down list, and then click the range select icon to select which cells you plan to publish.
    • Previously published items (Earlier published items). This option allows you to republish a sheet or items that you have previously shared. If you want to delete one of the list items, just highlight it and click remove (Delete).
  6. Title (Heading). To add a web page title to be displayed in the browser title, click the button Change (Edit) to the right of item Title (Title) and enter the desired title.How to Convert Excel Tables to HTML
  7. Нажмите кнопку CATEGORIES (Browse) to the right of the item File name (File name) and select the hard disk folder, web folder, web server, HTTP or FTP address where you want to save the web page.

Tip: If you’re converting an Excel workbook to an HTML file for the first time, it’s wise to save the web page to your hard drive first so you can make edits if necessary before publishing the page to the web or local network.

  1. In addition, you can export the file to an already existing web page, provided that you have rights to edit it. In this case, pressing the button Publish (Publish), you will receive a message prompting you to write the data in place of the existing web page content or place it at the end of the web page. If the first – click Replace (Replace) if the second – Add to file (Add to file).
  2. Check the box AutoRepublish every time this workbook is saved (Auto republish each time workbook is saved) if you want the workbook or selected items to be automatically published after each workbook save. Later in this article, I will explain how this feature works in more detail.
  3. Check the box Open published Web page in browser (Open page in browser) if you want to view the web page immediately after saving.
  4. Нажмите кнопку Publish (Publish). You’re done! In the image below, our Excel spreadsheet looks quite neat, although the design is a bit distorted.How to Convert Excel Tables to HTML

Note: The HTML generated by Excel is not very clean! It will be great when, after converting a large table with a complex design, you open it in any HTML editor and clean up the code before publishing. As a result, the page on the site will load noticeably faster.

5 things to remember when converting Excel files to HTML

When using the Save as Web Page tool, it’s important to understand how its main options work so you don’t make the most common mistakes and avoid the most common error messages. In this section, you will find a brief overview of the parameters that you need to pay special attention to when converting Excel files to HTML.

1. Support files and hyperlinks

As you know, web pages often contain pictures and other supporting files, as well as hyperlinks to other websites. By converting an Excel file into a web page, the application automatically collects related files and hyperlinks for you and saves them to an auxiliary folder.

When you save supporting files such as charts and background textures to the same web server, Excel creates all links relative. A relative link (URL) points to a file within the same website; it specifies the filename or root folder instead of the full site name (eg href=”/en/images/001.png”). When you delete any item saved as a relative link, Microsoft Excel automatically removes the linked file from the auxiliary folder.

So the main rule is always keep the web page and supporting files in the same placeotherwise the web page will not display correctly. If you move or copy your web page to another location, make sure the sub folder is copied to the same location, otherwise the links will be invalid. If you re-save the web page to a different location, Microsoft Excel will copy the auxiliary folder next automatically.

If you save web pages to different locations, or if the Excel file contains hyperlinks to external websites, then in such cases absolute links. Absolute links contain the full path to a file or web page, which can be accessed from anywhere, for example: www.yourdomain/section/page.htm.

2. Making changes and resaving the web page

In theory, you can save an Excel workbook as a web page, then open the resulting web page in Excel, make changes, and resave the file. However, in this case, some features of Excel will not be available. For example, any charts contained in your workbook will turn into independent drawings, and you will not be able to modify them in Excel, as you did before.

Therefore, the best way is to first update the original Excel workbook with certain changes, then save it as an Excel workbook (.xlsx), and only then convert it to a web page again.

3. Auto republish a web page

If you have checked the box next to AutoRepublish (Auto Reissue) in the dialog box Publish As Web Page (Publish Web Page) that we mentioned earlier in this article, then your web page will be automatically updated every time you save the workbook. This feature is very useful and allows you to always keep an up-to-date online copy of your Excel spreadsheet.

If you enable the option AutoRepublish (Auto Republish), a message will appear asking you to confirm whether you want to enable or disable autorepublish every time you save the workbook. If you want the Excel sheet to be published automatically, then select Enable… (Enable …) and click OK.

How to Convert Excel Tables to HTML

However, there may be circumstances where you do not want to automatically publish an Excel sheet or its elements, for example, if the file contains confidential information or has been modified by someone who is not a trusted person. In this case, you can temporarily or permanently disable auto-reissue.

To temporarily disable auto-republishing, select the first of the suggested options in the above message − Disable the AutoRepublish feature while this workbook is open (Disable AutoRepublish when this book is open.) This will disable automatic publishing for the current Excel session, but the next time you open the workbook, it will be enabled again.

To disable auto-republish permanently for all selected items, open an Excel workbook, go to the dialog box Publish As Web Page (Publish Web Page) and click Publish (Publish). In chapter Items to publish (Published items) in the list Choose (Select) select the item you do not want to publish and press the button remove (Delete).

How to Convert Excel Tables to HTML

4. Excel Features Not Supported on Web Pages

Unfortunately, some very useful and popular Excel features become unavailable when you convert your Excel sheets to HTML:

  • Уword formatting not supported when saving excel sheet as Single File Web Page (Web page in this file) so make sure you save it as web Page (Webpage). Bar graphs, color bars, and icon sets are not supported by both web page formats.
  • rotated or vevertical text not supported when exporting data from Excel to web page format. Any rotated or vertical text in your workbook will be converted to horizontal text.

5. Most Common Difficulties Encountered When Converting Excel Files to HTML

When converting an Excel workbook to a web page, you may encounter the following known issues:

  • Cell content truncated or not fully displayed. To avoid losing part of the text, you need to either turn off text wrapping, or shorten the text, or make the column wider. Align the text in the cell to the left.
  • Elements that are added to an existing web page are always appear at the very end of the page, while you want to place them at the top of the page or in the middle. This is normal when saving an Excel file to an existing web page. To move the data to another location on the page, you must edit the resulting web page in any HTML editor, or rearrange the elements in the Excel workbook and convert it back to a web page.
  • Links on the web page are not working. The most obvious reason is that you have moved a web page or auxiliary folder to another location. For more information about this, see the Help files and hyperlinks section.
  • A red cross (X) is displayed on the web page. A red cross indicates an undetectable drawing or other graphic element. The reason is most likely the same as with non-working hyperlinks. Just make sure you always keep the web page and auxiliary folder in the same place.

Leave a Reply