用第三方组件:NPOI来实现 先去官网:http://npoi.codeplex.com/下载需要引入dll(可以选择.net2.0或者.net4.0的dll),然后在网站中添加引用.使用 NPOI 你就可以在没有安装 Office 或者相应环境的机器上对 WORD/EXCEL 文档进行读写. 创建一个实体类: [Table("Customer") ] public class Customer { [Key] public int Id { get; set; } public st…
Timer定时任务 下面是Timer函数的官方doc介绍信息 """ Call a function after a specified number of seconds: t = Timer(30.0, f, args=None, kwargs=None) t.start() t.cancel() # stop the timer's action if it's still waiting """ 第一个参数时指定多长时间之后执行这个函数,…