Location: PHPKode > scripts > phpRetrieve > phpRetrieve/xml_layout.php
<?php



$C_Date = date("Y-m-d");// current date



function bookHeader($un){  //user name



	$C_Date = date("Y-m-d");// current date



	return "<?xml version=\"1.0\"?>

	<?mso-application progid=\"Excel.Sheet\"?>

	<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"

	xmlns:o=\"urn:schemas-microsoft-com:office:office\"

	xmlns:x=\"urn:schemas-microsoft-com:office:excel\"

	xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"

	xmlns:html=\"http://www.w3.org/TR/REC-html40\">

	<DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">

	<LastAuthor>$un</LastAuthor>

	<Created>".$C_Date."T00:00:00Z</Created>

	<Version>11.9999</Version>

	</DocumentProperties>

	<ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">

	<WindowHeight>9855</WindowHeight>

	<WindowWidth>19020</WindowWidth>

	<WindowTopX>120</WindowTopX>

	<WindowTopY>30</WindowTopY>

	<ProtectStructure>False</ProtectStructure>

	<ProtectWindows>False</ProtectWindows>

	</ExcelWorkbook>

	<Styles>

	<Style ss:ID=\"Default\" ss:Name=\"Normal\">

	<Alignment ss:Vertical=\"Bottom\"/>

	<Borders/>

	<Font/>

	<Interior/>

	<NumberFormat/>

	<Protection/>

	</Style>

	<Style ss:ID=\"s21\">

	<Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Bottom\"/>

	<Font ss:Color=\"#FFFFFF\"/>

	<Interior ss:Color=\"#008080\" ss:Pattern=\"Solid\"/>

	</Style>

	<Style ss:ID=\"s22\">

	<NumberFormat ss:Format=\"Short Date\"/>

	</Style>

	<Style ss:ID=\"s23\">

	<NumberFormat ss:Format=\"Short Time\"/>

	</Style>

	<Style ss:ID=\"s25\">

	<Alignment ss:Vertical=\"Bottom\"/>

	<Borders/>

	<Font/>

	<Interior ss:Color=\"#99CCFF\" ss:Pattern=\"Solid\"/>

	<NumberFormat/>

	<Protection/>

	</Style>

	<Style ss:ID=\"s26\">

    <Alignment ss:Horizontal=\"Center\" ss:Vertical=\"Center\" ss:WrapText=\"1\"/>

    <Font ss:Color=\"#FFFFFF\"/>

    <Interior ss:Color=\"#008080\" ss:Pattern=\"Solid\"/>

    </Style>

	<Style ss:ID=\"s27\">

	<Font x:Family=\"Swiss\" ss:Size=\"14\" ss:Bold=\"1\"/>

	</Style>

	  <Style ss:ID=\"sTitle\">

   <Alignment ss:Horizontal=\"Left\" ss:Vertical=\"Bottom\" ss:Indent=\"2\"/>

   <Font x:Family=\"Swiss\" ss:Size=\"14\" ss:Color=\"#FFFFFF\" ss:Bold=\"1\"/>

   <Interior ss:Color=\"#008080\" ss:Pattern=\"Solid\"/>

  </Style>

  <Style ss:ID=\"sDate\">

   <Alignment ss:Horizontal=\"Left\" ss:Vertical=\"Bottom\" ss:Indent=\"2\"/>

   <Font x:Family=\"Swiss\" ss:Color=\"#FFFFFF\" ss:Bold=\"1\"/>

   <Interior ss:Color=\"#008080\" ss:Pattern=\"Solid\"/>

   <NumberFormat ss:Format=\"[$-F800]dddd\,\ mmmm\ dd\,\ yyyy\"/>

  </Style>

	</Styles>

	";

 }

 

 function sheetHeader($pg, $r, $c){  //page name, rows, cols

 

	$r = $r + 6;

	if($c < 4){ $c = 4; }

	return "<Worksheet ss:Name=\"Page_$pg\">

	<Names>

	<NamedRange ss:Name=\"_FilterDatabase\" ss:RefersTo=\"='Page_$pg'!R6C1:R".$r."C".$c."\"

		ss:Hidden=\"1\"/>

	<NamedRange ss:Name=\"Print_Titles\" ss:RefersTo=\"='Page_$pg'!R6\"/>

	</Names>

	<Table ss:ExpandedColumnCount=\"".$c."\" ss:ExpandedRowCount=\"".$r."\" x:FullColumns=\"1\"

	x:FullRows=\"1\">\n";



}



 function titles($Title){  //page name, rows, cols

 

	$C_Date = date("Y-m-d");// current date

	return "<Row ss:Index=\"2\" ss:Height=\"18\">

    <Cell ss:MergeAcross=\"3\" ss:StyleID=\"sTitle\"><Data ss:Type=\"String\">".$Title."</Data></Cell>

   </Row>

   <Row ss:Index=\"4\">

    <Cell ss:MergeAcross=\"2\" ss:StyleID=\"sDate\"><Data ss:Type=\"DateTime\">".$C_Date."T00:00:00.000</Data></Cell>

   </Row> \n";



}

  

 function sheetFooter($un, $rn, $o, $r, $c ){ //user name, report name, orientation, rows, cols

 

	$r = $r + 6;

	return "</Table>

	<WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">

		<PageSetup>

		 <Layout x:Orientation=\"".$o."\"/>

		 <Header x:Data=\"".$rn." / ".$un." &amp;D&amp;RPage &amp;P\"/>

		 <Footer x:Data=\"&amp;Z&amp;F&amp;RPage &amp;P\"/>

		 <PageMargins x:Left=\"0.46\" x:Right=\"0.48\"/>

		</PageSetup>

		<FitToPage/>

	<Print>

		<FitHeight>1000</FitHeight>

		<ValidPrinterInfo/>

		<PaperSizeIndex>9</PaperSizeIndex>

		<HorizontalResolution>200</HorizontalResolution>

		<VerticalResolution>200</VerticalResolution>

	</Print>

	<Selected/>

	<ProtectObjects>False</ProtectObjects>

	<ProtectScenarios>False</ProtectScenarios>

	</WorksheetOptions>

	<AutoFilter x:Range=\"R6C1:R".$r."C".$c."\"

	xmlns=\"urn:schemas-microsoft-com:office:excel\">

	</AutoFilter>

	</Worksheet>";

	//</Workbook>";



}







?>

Return current item: phpRetrieve