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
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.
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.
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
Activity
mganss commentedon Mar 28, 2024
Have you tried setting
CreateMissingHeadersto 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 commentedon Mar 28, 2024
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 commentedon Apr 9, 2024
Can you attach an example Excel file here?