I have html table in Microsoft.Office.Interop.Outlook.MailItem body and I just need to fill excel sheet with this table using C# for desktop application. Could any one help me in this regard. Thanks
A quick and dirty way:
File.WriteAllText(@"C:\Temp\Table.xls", mailItem.Body);
Excel will open it even though the file does not contain a valid xls document
您还可以使用HtmlAgilityPack解析电子邮件和EPPlus以写入Excel(仅限2007/2010 xlsx版本)。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.