When you click the Publish button, Excel closes the Publish As Web Page dialog box, saves the spreadsheet as an HTML file, and then immediately launches your default web browsing program while at the same time opening the new HTML file in the browser.
After you finish looking over the new HTML file in your web browser, click its program window’s Close button to close the browser and HTML file and to return to Excel and the original worksheet.