我们可以使用Windows服务将Outlook邮件导出到excel表吗? [英] Can we export the outlook mails into excel sheet using windows service?
问题描述
我想使用Windows服务将Outlook邮件导出到Excel工作表中,然后将这些邮件存储到SQL Sever中。
I want to export the outlook mails into excel sheet using windows service and then stored those mails into SQL Sever.
推荐答案
可能不是来自Windows服务号,因为基于服务的应用程序不支持Office应用程序的自动化。您可能需要使用EWS来读取电子邮件,然后使用带有ADO.NET和
OLEDB的SQL INSERT语句将其导出到Excel。
Probably not from a Windows Service no, since the automation of Office apps is not supported from a service based application. You would probably need to use EWS to read the e-mail and then export it to Excel using a SQL INSERT statement with ADO.NET and OLEDB.
如何:在Exchange中使用EWS处理Exchange邮箱项目
https://www.aspsnippets.com/Articles/Export-Data-to-Excel-Sheet-using-ADO.Net-and-C.aspx
这篇关于我们可以使用Windows服务将Outlook邮件导出到excel表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!