I am trying to Edit and existing Excel Spreadsheet and then fill data in Certain fields. Tried to use different methods online but it keeps failing at different places.
For right now I jsut want to get at the existing sheet, then edit certain fields and then present to the user to save to their local machine. here is what I have so far. the code below keeps telling me I need at least one worksheet, so this tells me its
not getting the existing file but creating a new one.
protected void lnkExport_Click(object sender, EventArgs e)
{
var ExistFile = Server.MapPath("~/Excel/NSS.xlxs");
var File = new FileInfo(ExistFile);
using (ExcelPackage package = new ExcelPackage(File))
{
ExcelWorkbook workBook = package.Workbook;
if (workBook != null)
{
if (workBook.Worksheets.Count &g ...
Go to the complete details ...