Error At AddImage(imagePath,XLHFOccurrence.FirstPage);
Error : The method or operation is not implemented.
var workbook = new XLWorkbook();
var worksheet = workbook.Worksheets.Add("Covering Letter",1);
// worksheet = InsertHeaderFooter(worksheet);
//worksheet.PageSetup.Header.Right.AddText("THis is header");
string imagePath = System.Web.Hosting.HostingEnvironment.MapPath("~/Content/img/tuv-logo.jpg");
worksheet.PageSetup.Header.Right.AddImage(imagePath,XLHFOccurrence.FirstPage);
Comments: You can't: https://closedxml.codeplex.com/wikipage?title=How%20can%20I%20insert%20an%20image%3f&referringTitle=Documentation It is possible in OpenXML itself but it is horribly complex. An example of just inserting an image can be found here: http://user239.blogspot.co.uk/2011/03/how-to-insert-image-to-excel-document.html Maybe you can adapt it to work in a header.
Error : The method or operation is not implemented.
var workbook = new XLWorkbook();
var worksheet = workbook.Worksheets.Add("Covering Letter",1);
// worksheet = InsertHeaderFooter(worksheet);
//worksheet.PageSetup.Header.Right.AddText("THis is header");
string imagePath = System.Web.Hosting.HostingEnvironment.MapPath("~/Content/img/tuv-logo.jpg");
worksheet.PageSetup.Header.Right.AddImage(imagePath,XLHFOccurrence.FirstPage);
Comments: You can't: https://closedxml.codeplex.com/wikipage?title=How%20can%20I%20insert%20an%20image%3f&referringTitle=Documentation It is possible in OpenXML itself but it is horribly complex. An example of just inserting an image can be found here: http://user239.blogspot.co.uk/2011/03/how-to-insert-image-to-excel-document.html Maybe you can adapt it to work in a header.