win2003下导出Excel如何在Excel应用程序里设置权限
主要是在关闭进程的时候权限报错
tworkbook.Close(False, Path1, missing)
AExcel.Workbooks.Close()
AExcel.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(tworkbook)
System.Runtime.InteropServices.Marshal.ReleaseComObject(AExcel)
If Not AExcel Is Nothing Then
For Each p As System.Diagnostics.Process In System.Diagnostics.Process.GetProcessesByName("Excel")
If p.CloseMainWindow = False Then
p.Kill()
End If
Next
End If
在Config里加入<identity impersonate="true"/>还是不行,如果换成<identity impersonate="true" username="***" password="***"/>就行,可是那样不灵活,就要用上面的。
在Excel应用程序访问,启动和激活,更改权限安全里添加了NETWORK SERVICE,还是不行,求教高手!