Free Support Forum - aspose.com

Aspose.Excel GetHeader property

how can i get header values of sheet?

What do you mean “header values of sheet”? Are you talking about name of worksheet, such as Sheet1, Sheet2, …? If yes, please use Worksheet.Name property.

no, I mean i wanna get from pagesetup property of sheet header and footer elements.

i can set it with this command

sheet.PageSetup.SetHeader(0)

but i can't get it sheet.PageSetup.GetHeader(0) or etc.

meanwhile i use aspose.cells 4.0.0.0 version

Now this feature is not supported yet. Could you please tell me why you need this feature? I can add this feature in the future release.

hi Laurence,

I need this feature that my excel sheets have a tags in the header or footer block. when i will create report, replace to report code, report title etc.

thanks for care

OK. I will add this feature in about 2 weeks.

Sorry, my mistake. Aspose.Cells already supports GetHeader method. Please download and try v4.0.1 at www.aspose.com/downloads.

Workbook workbook = new Workbook();
workbook.Open("d:\\test\\book1.xls");

Console.WriteLine(workbook.Worksheets[0].PageSetup.GetHeader(0));
Console.WriteLine(workbook.Worksheets[0].PageSetup.GetHeader(1));
Console.WriteLine(workbook.Worksheets[0].PageSetup.GetHeader(2));

thansk for care Lourence.

best regards

Ahmet Demirel