/// <summary> /// 添加实体 /// </summary> /// <typeparam name="T">实体类型</typeparam> /// <param name="entity">实体</param> /// <param name="propertyNames">属性名集合</param> private void AddEntity <T>(T entity, IEnumerable <string> propertyNames) where T : class { var values = GetPropertyValues(entity, propertyNames); Sheet.AddBodyRow(values.ToArray()); }