Spreadsheet is an easy way to create large amount of data in a tabular format. You can use apps like Microsoft Excel, Apple Numbers or Google Sheets for managing tables in a spreadsheet format on different devices. Though spreadsheet is helpful for using as a file, HTML tables are preferred when you need to showcase the content on webpages. In this article, we will explain how to convert your spreadsheet to HTML table and the pros / cons of using it on your website.
Why to Use HTML Table?
Sending a spreadsheet in your email is an easy task. However, embedding Excel or other spreadsheet content in your website will not work well for many reasons. Since webpages are already in HTML format it is a good idea to use HTML table tags for creating tables instead of embedding spreadsheet.
- Search engines can understand HTML tags better than embedded spreadsheets in a webpage. If you have important content that you want to show in Google search results then HTML table is the way to go.
- You can easily make HTML tables responsible or even swap rows and columns to fit on smaller devices.
- It is also possible to enhance HTML tables with advanced features like search box and filter options.
- Some website building platforms do not support spreadsheet embedding in which case you have no options other than using HTML tables.
In summary, if you expect search engines to understand your tables and index the content then you need to use HTML tags for creating tables. Below is an example of Google search result showing tabular content. The advantage is that Google indexes each line in the table and shows separately for the related queries. This can improve the click through rate and hence the traffic to your site.
Convert Spreadsheet to HTML Table
Almost all website creating platforms offer table element or block which you can use for creating table online and publish on your site. Alternatively, you can also create tables offline and copy paste on your editor screen. However, this will take time for larger tables and you need to know basic HTML for creating tables offline using text editors. It can’t be a practical approach when you want to focus on the content. So, let’s explore the options for creating tables in spreadsheet and converting them into HTML quickly to paste in your website.
Depending upon the need and platform you use, you can use one of the following methods to convert spreadsheet to HTML table.
- Copy and paste spreadsheet content to create table
- Save spreadsheet as HTML file and get the source code
- Use third-party services for conversion
Let us explain each method in detail.
1. Copy and Paste Spreadsheet Content
Most website building platforms like Weebly does not allow copy pasting your Excel spreadsheet to convert it as a HTML table. They only allow embedding as a downloadable file or show the spreadsheet’s content using third-party services like Google Sheets. However, advanced content management systems like WordPress makes the task simple.
- Copy your spreadsheet content and paste in the editor. WordPress will automatically convert the content to a table and apply HTML tags accordingly. It will remove all unnecessary codes in the backend and only use standard HTML table tags. You can add header, footer and customize the table appearance with the colors. It is also possible to add the created table as a reusable element so that you can insert anywhere on your site without repeating the steps. When you update the Excel sheet, simply paste the updated content and replace the reusable table element. This will update the table content inserted on all the pages of your site.
- You can add the created table as a reusable element so that you can use anywhere on your site by keeping a single source. It means, whenever you update Excel content simply copy paste it on your site to replace the source and all the occurrences of the tables will get updated automatically.
- In addition, you can use plugins like TablePress to convert Excel sheet into table by uploading the file. This is very useful if you frequently update the content of the Excel and want to update the table content accordingly. This plugin will create a shortcode for your table which you can insert anywhere on the site. Whenever you update the source Excel, simply re-upload the sheet to overwrite the existing table. This will update the content on all the occurrences of tables inserted on your site without the need of editing each table separately.
2. Convert Excel to HTML
Unfortunately, not all platforms work like WordPress and the above method will not work in Weebly and many other platforms. In this case you can convert the spreadsheet to HTML content and embed in your site.
- Open the Excel spreadsheet and save the file as a webpage with .htm or .html extension.
- In Windows, you will have two options to save “Single File Web Page” or “Web Page. Make sure to select “Web Page” option and “Selection: Sheet” to save the file.
- This will open an additional dialog box showing the selected sheet and click “Publish” to save your sheet as HTML page.
- In Excel for Mac, select “Sheet” and click “Save” button for converting the sheet to HTML webpage.
- Now, right click on the saved HTML file and open it with any text editor like Notepad or Microsoft Visual Code. Remember, you can’t use TextEdit in Mac as it will open the table instead of the source content.
- You will see the source HTML for the Excel spreadsheet and copy all to clipboard.
- Go to your website admin panel and paste the code using elements like Custom HTML or Embed Code.
- Generally, you can preview the table inside the editor before publishing as shown below for WordPress.
- Publish your page and open it in a browser to check the table looks good.
3. Use TABLEIZER
The last option is to use the third-party tool called tableizer to convert your Excel spreadsheet or Google Docs to HTML table code.
- Copy your Excel spreadsheet.
- Go to tableizer site and paste the copied code.
- You have few customizing options to insert CSS, change font size/family and header color.
- Click “Tableize it!” button to get the HTML code.
- Click “Copy HTML to Clipboard” button to copy the code. You can also scroll down on the result page to preview your table.
- Now, go to your website and paste the table code using Custom HTML or Embed Code element.
This method helps to remove all unnecessary CSS from your spreadsheet content and use plain HTML tags.
Cons of Using HTML Tables
HTML tables have the following restrictions comapred to spreadsheet:
- You can’t convert spreadsheet with filters, macros and other advanced feature to HTML tables. For example, Microsoft Excel will show you warnings like below when saving the file as a web page.
- Whenever updating your spreadsheet, you also need to generate the source code and update it on your website. This is a double work compared to automatically updating from embedded Google Sheets.
- You can’t allow users to download table content using HTML while you can allow file downloading with Excel or Google Sheets.
It is easy to create and share tabular data using spreadsheet format. However, when it comes to using tables in website, HTML tables can help with search engine visibility. Though you need to reduce the funcstionalities with HTML tables, it show the structured data in serach engine results thus increase the possibility of getting more visitors to your site. You can use one of the above methods to create and embed HTML table code for your spreadsheet data.
Leave a Reply
Your email is safe with us.