MDeLeon.. Thanks for the reply..
That workbook doesnt have any worksheets in it.. I am getting the same error even I change it to following code.
That workbook doesnt have any worksheets in it.. I am getting the same error even I change it to following code.
public void WriteStaticSheets(XLWorkbook wb)
{
var workbookTemplate = new XLWorkbook("D:\\BIP Forecast Template - Guide.xlsx");
foreach(var ws in workbookTemplate.Worksheets)
{
if (!wb.Worksheets.Where(x => x.Name == ws.Name).Any())
{
wb.AddWorksheet(ws);
}
}
}