Skip to content

combo properties leads to empty excel #299

Open

Description

@MannusEtten
    var excel = new ExcelMapper()
    {
        HeaderRow = false,
        MinRowNumber = 3
    };

    try
    {
        excel.Save(_fileName, serviceItems);
    }

the list of service items is filled with 50 items, without the properties of HeaderRow and MinRowNumber there is a sheet coming with headers and 50 rows

in this case I get empty sheets
I do have a prepared Excel-sheet with column names and conditional formatting, I would like to add my records to it so that is why I use the minRowNumber so it will skip the first 2 rows with my column information.

But it produces now empty sheets....

Activity

  1. mganss commented on Mar 28, 2024

    @mganss
    Owner

    Have you tried setting CreateMissingHeaders to true?

    I'm not sure I understand your use case. Do you have a template, i.e. an existing Excel file that you want to fill? If so, you'll need to load it into the instance of ExcelMapper that you're using to save by either loading the Excel file or passing a Workbook object into it.

  2. MannusEtten commented on Mar 28, 2024

    @MannusEtten
    Author

    i do have existing excel , i tried it as well with loading the excel-spreadsheet, it does not fill any record. Because my header is 2 rows instead of 1 i set the property MinRowNumber to 3

  3. mganss commented on Apr 9, 2024

    @mganss
    Owner

    Can you attach an example Excel file here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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