Thanks for your inquiry. You are facing this issue because you have multiple sections in your document. In this case, primary headers and footers are exported at the beginning and the end of each section.
We suggest you please use HtmlSaveOptions.ExportHeadersFootersMode property as shown below. This property specifies how headers and footers are output to HTML, MHTML or EPUB. Default value is PerSection for HTML/MHTML. When the value of this property is FirstSectionHeaderLastSectionFooter, primary header of the first section is exported at the beginning of the document and primary footer is at the end.
Document doc = new Document(MyDir + "in.docx");
Aspose.Words.Saving.HtmlSaveOptions saveOptions = new Aspose.Words.Saving.HtmlSaveOptions(SaveFormat.Html);
saveOptions.ExportHeadersFootersMode = ExportHeadersFootersMode.FirstSectionHeaderLastSectionFooter;
doc.Save(MyDir + "18.7.html", saveOptions);