I have a Windows Forms with button click operation.
On button click the specified columns in excel should be exported to html.
I used "SaveAs" method. But not able to open the file format in any browser. Please help me how to export specific columns('B','D') to hmtl with cell color.
What I have tried:
Dim xlApp As Excel.Application
Dim xlWB As Excel.WorkBook
Dim xlSH As Excel.WorkSheet
Dim str_File As String = "C:\Sample.xlsx"
xlApp = New Excel.Application
xlWB = xlApp.Workbooks.Open(str_File)
xlSH = xlWB.WorkSheets("merge") xlSH.SaveAs("C:\Sample.html")