How to insert Header & footer to Excel file

Hi,

Anyone can tell me about how to insert Header & footer to Excel file?

Thanks!


Hi,

Thanks for your consideration.
Currently you can only insert header& footer to the designer file. At the end of this week, a new hotfix will be released. In this new hotfix, you can insert header & footer through API.

Hi,

Please download hotfix 1.6.2.

PageSetup object is added. You can use it to insert header/footer.

Hi Laurence,

Thanks for your quick response!

I have one more question here, how do I insert a line in header & footer section?


Hi, forbi.

Do you know how to insert a line in header & footer section in MS Excel?
I have investigate MS Excel and I don’t think MS Excel support this feature.

Hi Laurence,

I can only manage to insert a picture (picture with line) instead of a line in header & footer section.

Hi forbi,

Yes. I also can only do this.

Currently Aspose.Excel can only support to insert a picture in header/footer section of a designer file. The API support will be added in the future.

So now you can insert a line image in header/footer section of your designer file, then use Aspose.Excel to do the rest.

I have a designer file with a line image in the center header. When I add text to the left and right header the line image disappears.

Scott

Dear Scott,

Image in header is a new feature in ExcelXP. Aspose.Excel is mainly based on Excel2000. Currently, you can insert a line image in the header and use api to set footer.
If you add text to the left and right header, the line image in the center header will disappears because it is discarded.

I will add this feature to meet your need within this week.

I download and installed 1.7.1.0 and the picture in the center header still disappears. Was this fixed.

Also, I have a designer file with 17 worksheets all with the same footer, but the page number. I do not use the the footer api to modify the footers, but some of the pictures do not get put into the new saved excel file. Some do and some don’t.

The footer contains 2 pictures

Dear Scott,

Please be sure that the Aspose.Excel.dll is replaced. I have tested in my machine and all work fine.

Could you send me your design files which have problem? And if possible, please send me the sample code which remove the image header.

I will investigate this problem.

Dear Scott,
I got your file and fix the problem. Please download hotfix 1.7.2 and have a try.