使用NPOI 操作Excel 个人使用的电脑基本默认安装Excel 操作起来 调用Excel的组件便可.如果是一台服务器.没有安装Excel,也就无法调用Excel组件. 在此推荐第三方插件.NPOI 支持XLS(2007)和XLSX(2012)读写. using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; using System; using System.Collections.Gener…
C# 操作LDAP查找组或人员信息 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.DirectoryServices; /// <summary> ///ADUtil 的摘要说明 /// </summary> public class ADUtil { // LDAP地址 例如:LDAP://my.com.cn private con…
要用代码访问 Active Directory域服务,需引用System.DirectoryServices命名空间,该命名空间包含两个组件类,DirectoryEntry和 DirectorySearcher.DirectoryEntry类可封装 ActiveDirectory域服务层次结构中的节点或对象,使用此类绑定到对象.读取属性和更新特性:使用DirectorySearcher类可对 Active Directory域服务层次结构执行查询. 如果仅要对AD的组织单元,群组和用户进行查询或…