Skip to content

ExcelMapper always generate extra columns #298

@LJN-hzleaper

Description

@LJN-hzleaper

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; }
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions