I use v.6.0.17 and get NullReferenceException running the code below:
using (FileStream fstream = new FileStream(sourcePath, FileMode.Open)) { Aspose.Cells.Workbook w= new Aspose.Cells.Workbook(fstream); var pageSetup = w.Worksheets[0].PageSetup;
//This line causes NullReferenceException when setting either Header or Footer below pageSetup.ClearHeaderFooter();
Please try our latest fixed version: v7.0.2.2, if you still find the issue, give us your template Excel file here to reproduce the issue. We will check it soon.