I have an html table in a Microsoft.Office.Interop.Outlook.MailItem object, and I just need to populate the excel sheet with this table using C # for a desktop application. Can anyone help me in this regard. Thanks
Quick and dirty way:
File.WriteAllText(@"C:\Temp\Table.xls", mailItem.Body);
Excel will open it even if the file does not contain a valid xls document
You can also use HtmlAgilityPack for parsing email and EPPlus for writing to Excel (xlsx 2007/2010 only).