首页 新闻 赞助 找找看

System.ComponentModel.Win32Exception: 拒绝访问。

0
[已关闭问题] 关闭于 2013-12-06 13:25

public void PreExitExcel(DateTime excelStart, DateTime excelEnd)
    {
        Process[] execls = Process.GetProcessesByName("excel");
        foreach (Process execl in execls)
        {
            
            DateTime starttime = execl.StartTime;
            if (starttime >= excelStart && starttime <= excelEnd)
            {
                execl.Kill();
            }
        }

    }

新麦穗的主页 新麦穗 | 初学一级 | 园豆:82
提问于:2013-09-26 13:56
< >
分享
所有回答(1)
0

权限问题,看看你的权限

异次元代码 | 园豆:101 (初学一级) | 2016-11-13 11:59
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册