We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Create a Footer that spans the width of the page with a border and an image in the center?

Using XlsIO I have created the excel sheet as required.

I require the following of the footer:

     1.     Width of footer should be the width of the page.
     2.     The footer should have a border around it.
     3.     The footer should optionally have a background color. 
     4.     There should be an image in the center of the footer.

I can create the footer and add an image to the center of the footer, but not the other requirement.

               IPageSetup pageSetup = (IPageSetup)worksheet.PageSetup;
               pageSetup.CenterFooterImage = Image.FromFile(server.MapPath("~\\Content\\Images\\filename.png"));
               pageSetup.CenterFooter = "&G";

Neill


1 Reply

AV Abirami Varadharajan Syncfusion Team August 19, 2019 12:21 PM UTC

Hi Neill, 

Please find the details for your queries below. 

Queries 
Details 
Width of footer should be the width of the page 
By default, header and footer will use the page width. Microsoft Excel don’t have an option to specify the width of header and footer. 
The footer should have a border around it. 
Your requirement of adding border or background color to the header/footer is not possible in Microsoft Excel. So, your requirement can’t be achieved. 

However, you can format the header or footer text. Please refer to the below documentation to know more on working with header and footers. 


The footer should optionally have a background color. 

Regards, 
Abirami 


Loader.
Live Chat Icon For mobile
Up arrow icon