npio导出put

var mapper = new NMapper.Mapper();
mapper.Map<Model>("columnName", m => m.属性, tryPut: (c, m) =>
{
    var ismain = ((Model)m).属性;
    c.CurrentValue = ismain.HasValue ? (属性.Value ? "Y" : "N") : ""; 
    return true;
});
mapper.Put<Model>(DataList, "Sheeet_Name", true)
response.Contents = stream => { mapper.Workbook.Write(stream); };

 

posted @ 2022-11-14 14:56  vba是最好的语言  阅读(28)  评论(0编辑  收藏  举报