Header and Footer info

Hi,
Is there a method from which I can the get the header and footer information of a worksheet.
Thanks,
mas2005

Currently we only allow to set header and footer. Could you please tell me why you need this feature?

Thank you for the respose.

We needed to copy the header and footer information from one worksheet to another.

We have generated spreadsheet ML using XSLT and we want to save it into XLS format using Aspose. But Aspose removes the header and footer tags from the spreadsheet ML. We have Excel template to which we copy the data from the spreadsheet ML. We also want to copy the header and footer from these spreadsheet ML files on to the templates.

mas2005

Have you tried the latest v3.0.3? Header/footer tags in spreadsheetML are now supported. And when you use Worksheet.Copy method, those information are also copied.

@mas2005,
Aspose.Cells has replaced Aspose.Excel that is no more available now. This new product supports all the latest feaatues avaialble in different versions of MS Excel and also supports all the features in its predecessor product. Using Aspose.Cells, header and footer tags are maintained in the SpreadsheetML file. When such SpreadsheetML is converted to XLS, all the headers and footers are maintained as demonstarated in the following sample code.

// Instantiating a Workbook object
Workbook excel = new Workbook();
excel.Worksheets[0].Cells["A1"].Value = "Test Data";

// Obtaining the reference of the PageSetup of the worksheet
PageSetup pageSetup = excel.Worksheets[0].PageSetup;

// Setting worksheet name at the left section of the header
pageSetup.SetHeader(0, "&A");

// Setting current date and current time at the centeral section of the header
// and changing the font of the header
pageSetup.SetHeader(1, "&\"Times New Roman,Bold\"&D-&T");

// Setting current file name at the right section of the header and changing the
// font of the header
pageSetup.SetHeader(2, "&\"Times New Roman,Bold\"&12&F");

// Setting a string at the left section of the footer and changing the font
// of a part of this string ("123")
pageSetup.SetFooter(0, "Hello World! &\"Courier New\"&14 123");

// Setting the current page number at the central section of the footer
pageSetup.SetFooter(1, "&P");

// Setting page count at the right section of footer
pageSetup.SetFooter(2, "&N");

// Save the Workbook.
excel.Save("SetHeadersAndFooters_out.xml",SaveFormat.SpreadsheetML);
Workbook workbook = new Workbook("SetHeadersAndFooters_out.xml");
workbook.Save("SetHeadersAndFooters_out.xls");

For more details on setting headers and footers, refer to the following link:
Setting Headers and Footers

Here is a free trial version which can be downloaded from the following link:
Aspose.Cells for .NET (Latest Version)

You can test all the features of this product by downloading a runnable solution here.