Google Sheets – Export Part of Spreadsheet to HTML

google sheets

Google spreadsheet allows you to save the table as HTML:

save google spreadsheet as HTML

The problem is that what the HTML you get is not publishable in website or coherent HTML document:

exported google spreadsheet

I'd just like a part of the table as HTML. What can I do?

Best Answer

I suppose your documents holds data that you do not want to share.

So I would :

  1. add a sheet "public" in which I would copy/paste the data
  2. use the built-in "publish for the web" functionality enter image description here
  3. in the "publish" dialog, limit the publication to the "public" worksheet

Note that, instead of copy/paste (annoying if the data changes frequently) you can use the IMPORTRANGE function.