use macro write html web page

I am trying to convert an Excel project that creates web pages from spreadsheet data using macros. Both Excel & LibreOffice will render text as a web page but not easily save the html code without embedding it in another pair of tags.
In Excel I use
WordBasic.FileSaveAs Name:=“FileName.htm”, Format:=2
WordBasic.DocClose 2
I have tried looking for an equivalent but I am not good at finding such haystack needles
Any pointers gratefully received