Applied the pertinent patch for bug #21439 by Paul Pound to get the header/footer from the sheet and not a chart.