Sub Export_HTML()
Dim DC&, i&, strPath$
strPath = ThisWorkbook.Path & "\"
ActiveSheet.Copy After:=Sheets(Sheets.Count)
DC = Cells(1, Columns.Count).End(xlToLeft).Column
Application.DisplayAlerts = False
For i = 1 To DC
If Columns(i).Hidden Then
Columns(i).Delete
End If
Next
Range("A1").CurrentRegion.Borders.LineStyle = 1
ActiveSheet.Name = "EXPORT_HTM"
With ActiveWorkbook.PublishObjects.Add(xlSourceSheet, _
strPath & "test01.htm", "EXPORT_HTM", "", xlHtmlStatic, _
"TEST", "")
.Publish (True)
.AutoRepublish = False
End With
Sheets("EXPORT_HTM").Delete
End Sub