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.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.