guruprakashc
string sel = "";
Excel.Worksheet worksheet1 = (Excel.Worksheet)m_AddIn.Application.ActiveSheet;
Excel.Range newRange = Globals.ThisAddIn.Application.Selection as Excel.Range;
string saveandpath = Path.ToString() + "\\" + "index" + ".htm";
sel = newRange.Cells.Address[External: true];
Excel.PublishObject publt = Globals.ThisAddIn.Application.ActiveWorkbook.PublishObjects.Add(Excel.XlSourceType.xlSourceRange,saveandpath, worksheet1.Name, sel, Excel.XlHtmlType.xlHtmlStatic) as Excel.PublishObject;
publt.Publish(true);