var path = new FileStream((Server.MapPath("~") + "Content\\data\\Cause\\事业单位管理人员基本情况.xls"), FileMode.Open, FileAccess.Read);
var wb = new HSSFWorkbook(path);
var shet = wb.GetSheet("page 1");
var chain = shet.Chain("D7");
var rowFun = new List<Func<PersonInfo, bool>>
{
//合计
m=>true,
m=>m.Sex.Equals("女"),
m=>!m.FamilyName.Contains("汉族"),
m=>m.PoliticalFace.Contains("党员"),
m=>m.HigthDeggee.Contains("博士"),
m=>m.HigthDeggee.Contains("硕士"),
m=>true,
var person = session.Find<PersonInfo>();
//这是我们自己封装的类,查询表中的数据
for (var k = 0; k < colFun.Count; k++)
{
var col = colFun[k];
for (var i = 0; i < rowFun.Count; i++)
{
var row = rowFun[i];
var result = person.Where(col).Where(row).ToList();
chain.Output(result.Count());
//output是我们自己封装的类,自动换到下一个框里