Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combo properties leads to empty excel #299

Open
MannusEtten opened this issue Mar 28, 2024 · 3 comments
Open

combo properties leads to empty excel #299

MannusEtten opened this issue Mar 28, 2024 · 3 comments

Comments

@MannusEtten
Copy link

    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....

@mganss
Copy link
Owner

mganss commented Mar 28, 2024

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.

@MannusEtten
Copy link
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

@mganss
Copy link
Owner

mganss commented Apr 9, 2024

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants