Type xlsxHeaderFooter = Class

    Function Create(sheetobj, file, xml);
    Begin
		sheet_ := sheetobj;
		file_  := file;
		xmlFile_ := xml;
    End

	class Function NewObject(sheetname, file);
	Begin
		o := file.WorkBook().GetSheetObj(sheetname);
		xml := file.WorkBook().GetSheetXmlfile(sheetname);
		if not ifObj(o) then return 0;
		return new xlsxHeaderFooter(o, file, xml);
	End;

	// 设置sheet的页面页脚
	Function SetHeaderFooter(headerFooter);
	Begin
		node := xmlFile_.FirstChildElement('worksheet');
		header_node := node.FirstChildElement('headerFooter');
		if ifObj(header_node) then
		begin
			marshal := headerFooter.Marshal();
			class(TSXml).UpdateNode(header_node, marshal['attributes'], marshal['children']);
		end
		else begin
			prev_node := class(TSXml).GetWorkSheetPrevNode(node, 'headerFooter');
			node.InsertAfterChild(prev_node, headerFooter.Marshal());
		end
	End

private
	sheet_; //XmlSheet对象
	file_;  //TSExcelFile对象
	xmlFile_; //sheet对应的xml对象
End;
