You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my demo app, ExcelMapper always output extra columns that I dont't want. How to prevent it?
ExcelMapper mapper = new();
mapper.AddMapping(typeof(Dto), "Identity", nameof(Dto.Id));
mapper.AddMapping(typeof(Dto), "User Name", nameof(Dto.Name))
.ToExcelOnly();
mapper.Save("E:/Test.xlsx", GetData(), "Hi");
public class Dto
{
public int Id { get; set; }
public string? Name { get; set; }
}
Activity
LJN-hzleaper commentedon Mar 25, 2024
I can remove these columns one by one from output by
Ignore, but is there a batch way?mganss commentedon Mar 25, 2024
You can remove all mappings like so: