How do i clear rows in Excel using EPPLus library ?
Right now I am providing hard code value as I know the number of rows in excel that has data in it.
I would like my program knows how to clear the excel and import new data everytime in excel sheet.
How do i acheieve this ?
Right now I am providing hard code value as I know the number of rows in excel that has data in it.
I would like my program knows how to clear the excel and import new data everytime in excel sheet.
How do i acheieve this ?
My code :
using (ExcelPackage xlPackage = new ExcelPackage(new System.IO.FileInfo(sourcefile + fileName)))
{
ExcelWorksheet ws = xlPackage.Workbook.Worksheets[myWS];
ws.DeleteRow(2, 300);
{
ExcelWorksheet ws = xlPackage.Workbook.Worksheets[myWS];
ws.DeleteRow(2, 300);
// Other codes to import data.
}

alice yangRank #2,329 · 607 reputationPosted Oct 18, 2017, 5:31 PM EDT
Sundaram SubramanianRank #150 · 15.2K reputationPosted Oct 19, 2017, 4:25 AM EDT
Nepethya RanaRank #4,361 · 348 reputationPosted Oct 20, 2017, 6:24 AM EDT