<?php
$tcol = $this->numcols - 1;
		$this->sheet->setRow($this->y, 20);
		for ($i = 0; $i < $this->numcols; $i++)
			$this->sheet->writeBlank($this->y, $i, $this->formatTitle);
		$this->sheet->writeString($this->y, 0, $this->title, $this->formatTitle);
		$this->sheet->mergeCells($this->y, 0, $this->y, $tcol);
		$this->NewLine();
		$str = _("Print Out Date") . ':';
		$this->sheet->writeString($this->y, 0, $str, $this->formatLeft);
		$this->sheet->writeString($this->y, 1, Today() . "  ".Now(), $this->formatLeft);
		$this->sheet->writeString($this->y, $tcol-1, $this->company['coy_name'], $this->formatLeft);
		$this->sheet->mergeCells($this->y, $tcol-1, $this->y, $tcol);
		$this->NewLine();
		$str = _("Fiscal Year") . ':';
		$this->sheet->writeString($this->y, 0, $str, $this->formatLeft);
		$str = $this->fiscal_year;
		$this->sheet->writeString($this->y, 1, $str, $this->formatLeft);
		$this->sheet->writeString($this->y, $tcol-1, $this->host, $this->formatLeft);
		$this->sheet->mergeCells($this->y, $tcol-1, $this->y, $tcol);
//		for ($i = 0; $i < count($this->params); $i++)
//		{
//                if ($this->params[$i] != '')
//                {
//
//                    $str = _("Payroll") . ':';
//                    $this->Text($this->leftMargin, $str, $titleCol);
//                    $this->Text($this->leftMargin + 100, $this->params[0]);
//                    $this->NewLine();
//
//                    $str = _("Department") . ':';
//                    $this->Text($this->leftMargin, $str, $titleCol);
//                    $this->Text($this->leftMargin + 100, $this->params[1]);
//                    $this->NewLine();
//                    $this->NewLine();
////                        $str = $this->params[$i]. ':';
////                        $this->sheet->writeString($this->y, 0, $str);
////                        //$str = $this->params[$i];
////                        if ($this->params[$i] != '')
////                                $str .= " - " . $this->params[$i]['1'];
////                        $this->sheet->writeString($this->y, 1, $str, $this->formatLeft);
////                        if ($i == 1)
////                        {
////                                $this->sheet->writeString($this->y, $tcol-1, $this->user, $this->formatLeft);
////                                $this->sheet->mergeCells($this->y, $tcol-1, $this->y, $tcol);
////                        }	
//                }
//		}
		if ($this->params[0] != '') // Comments
		{
			$this->NewLine();
			$str = _("Payroll Run") . ':';
			$this->sheet->writeString($this->y, 0, $str, $this->formatLeft);
			$this->sheet->writeString($this->y, 1, $this->params[0], $this->formatLeft);
                        $this->NewLine();
                         
                        $str = _("Department") . ':';
			$this->sheet->writeString($this->y, 0, $str, $this->formatLeft);
			$this->sheet->writeString($this->y, 1, $this->params[1], $this->formatLeft);
                        $this->NewLine();

               
		}
		$this->NewLine();
		if ($this->headers2 != null)
		{
			for ($i = 0, $j = 0; $i < $this->numcols; $i++)
			{
				if ($this->cols2[$j] >= $this->cols[$i] && $this->cols2[$j] <= $this->cols[$i + 1])
				{
					if ($this->aligns2[$j] == "right")
						$this->sheet->writeString($this->y, $i, $this->headers2[$j], $this->formatHeaderRight);
					else	
						$this->sheet->writeString($this->y, $i, $this->headers2[$j], $this->formatHeaderLeft);
					$j++;	
				}
				else
					$this->sheet->writeString($this->y, $i, "", $this->formatHeaderLeft);
			}		
			$this->NewLine();
		}

		for ($i = 0; $i < $this->numcols; $i++)
		{
			if (!isset($this->headers[$i]))
				$header = "";
			else
				$header = $this->headers[$i];
			if ($this->aligns[$i] == "right")
				$this->sheet->writeString($this->y, $i, $header, $this->formatHeaderRight);
			else	
				$this->sheet->writeString($this->y, $i, $header, $this->formatHeaderLeft);
		}
		$this->NewLine();


?>
