var mapper = new Npoi.Mapper.Mapper(path);
//读取的sheet信息
var plat_MachineRNAndFBNConfig_DtoRows = mapper.Take<Plat_MachineRNAndFBNConfig_Dto>();
List<Plat_MachineRNAndFBNConfig_Dto> plat_MachineRNAndFBNConfig_DtoList = new List<Plat_MachineRNAndFBNConfig_Dto>();
foreach (var row in plat_MachineRNAndFBNConfig_DtoRows)
{
//映射的数据保留在value中
Plat_MachineRNAndFBNConfig_Dto plat_MachineRNAndFBNConfig_Dto = row.Value;
plat_MachineRNAndFBNConfig_Dto.MachineID = FrmPlat_Login.Instance.GetMachineIDByMachineName(plat_MachineRNAndFBNConfig_Dto.MachineName);
plat_MachineRNAndFBNConfig_DtoList.Add(plat_MachineRNAndFBNConfig_Dto);
}
maxErrorRows =10.超过10个错误就停止数据转换了。导出Excel只有10条数据