Solved

xml error

Posted on 2010-08-29
8
787 Views
Last Modified: 2013-11-25
I am trying to make database fed Excel sheet using an xml file created in php.

I get this error in the log file (in C:\Users\Me\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\):

xml-error in table
reason: erroneous value
file: C:\Users\Me\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\LA076CE4\File_2010-09-04[1].xls
group: Cell
HTML-code: Data
value: B1

xml-error in table
reason: erroneous value
file: C:\Users\Me\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\LA076CE4\File_2010-09-04[1].xls
group: Cell
HTML-code: Data
value: G 12

I don't have a clue what this means. Could anyone, please, explain it for me.
<?php
//error_reporting(E_ALL|E_STRICT); 
//ini_set('display_errors', '1');
date_default_timezone_set('Europe/Paris');
//echo "Upptagningsdag: $_POST[upptagningsdag]<br />Varv: $_POST[varv]";
list($ar,$man,$dag) = preg_split('/-/', $_POST['upptagningsdag']);
$datetime_1 = strtotime( "$man/$dag/$ar" );
$veckodag = date("l", $datetime_1);
//echo "<br />Veckodag: $veckodag<br />";  exit();
$upptagningsdag = $_POST['upptagningsdag'];
			if($veckodag == "Monday") { $veckodag = "M&aring;ndag";  }
			if($veckodag == "Tuesday") { $veckodag = "Tisdag";   }
			if($veckodag == "Wednesday") { $veckodag = "Onsdag";   }
			if($veckodag == "Thursday") { $veckodag = "Torsdag";  }
			if($veckodag == "Friday") { $veckodag = "Fredag";   }
			if($veckodag == "Saturday") { $veckodag = "L&ouml;rdag";   }
			if($veckodag == "Sunday") { $veckodag = "S&ouml;ndag";   }
			$varv = "$_POST[varv]";
	  include "../../dbconfig/dbconfig.php";
	  header("content-type: text/xml");
      header("Pragma: public");
      header("Expires: 0");
      header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
      header("Content-Type: application/force-download");
      header("Content-Type: application/octet-stream");
      header("Content-Type: application/download");;
      header("Content-Disposition: attachment;filename=Upptagning ".$_POST['upptagningsdag'].".xls ");
      header("Content-Transfer-Encoding: binary ");
      print "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
      print "<?mso-application progid=\"Excel.Sheet\"?>\n";
     
?>

<ss: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">
 <ss:DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
  <Author>Ericson Productions</Author>
  <LastAuthor>Lennart</LastAuthor>
  <LastPrinted>2009-06-07T19:02:13Z</LastPrinted>
  <Created>2008-03-04T13:29:15Z</Created>
  <LastSaved>2010-03-22T19:48:44Z</LastSaved>
  <Company>Home</Company>
  <Version>12.00</Version>
 </ss:DocumentProperties>
 <ss:ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
  <WindowHeight>2985</WindowHeight>
  <WindowWidth>3540</WindowWidth>
  <WindowTopX>14985</WindowTopX>
  <WindowTopY>2895</WindowTopY>
  <ProtectStructure>False</ProtectStructure>
  <ProtectWindows>False</ProtectWindows>
 </ss:ExcelWorkbook>
 <ss:Styles>
  <ss:Style ss:ID="Default" ss:Name="Normal">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font ss:FontName="Arial"/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </ss:Style>
  <ss:Style ss:ID="s49" ss:Name="Normal_Blad1">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Color="#000000"/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </ss:Style>
  <ss:Style ss:ID="m51662112">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="m51662132">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <NumberFormat ss:Format="Short Time"/>
  </ss:Style>
  <ss:Style ss:ID="m51662152">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <NumberFormat ss:Format="Short Time"/>
  </ss:Style>
  
  
    <ss:Style ss:ID="m31465920">
   <Alignment ss:Horizontal="Center" ss:Vertical="Center"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="24" ss:Bold="1"/>
  </ss:Style>
  
  
  
  <ss:Style ss:ID="m51662172">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <NumberFormat ss:Format="Short Time"/>
  </ss:Style>
  <ss:Style ss:ID="s63">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
  </ss:Style>
  <ss:Style ss:ID="s64">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <NumberFormat ss:Format="Short Time"/>
  </ss:Style>
  <ss:Style ss:ID="s65">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s66">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s67">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="8"/>
  </ss:Style>
  <ss:Style ss:ID="s68">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s69">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s70">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Bold="1"/>
   <NumberFormat ss:Format="Short Time"/>
  </ss:Style>
  <ss:Style ss:ID="s71">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12"/>
  </ss:Style>
  <ss:Style ss:ID="s72">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="11"/>
<NumberFormat ss:Format="yyyy/mm/dd;@"/>
  </ss:Style>
  <ss:Style ss:ID="s73">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders/>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12"/>
  </ss:Style>
  <ss:Style ss:ID="s74">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders/>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12"/>
   <NumberFormat ss:Format="dd/mmm"/>
  </ss:Style>
  <ss:Style ss:ID="s75">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s76">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s77">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s78">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s79">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s80">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Bold="1"/>
   <NumberFormat ss:Format="#,##0"/>
  </ss:Style>
  <ss:Style ss:ID="s81">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s82">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Bold="1"/>
  </ss:Style>
  <ss:Style ss:ID="s83">
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s84">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="8"/>
  </ss:Style>
  <ss:Style ss:ID="s85">
   <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="8" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s86">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Color="#000000"/>
  </ss:Style>
  <ss:Style ss:ID="s87">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s88">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s89">
   <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12"/>
  </ss:Style>
  <ss:Style ss:ID="s90">
   <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s91">
   <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s92">
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12"/>
  </ss:Style>
  <ss:Style ss:ID="s93">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12"/>
  </ss:Style>
  <ss:Style ss:ID="s94">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="8" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s95">
   <Alignment ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12"/>
  </ss:Style>
  <ss:Style ss:ID="s96">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="8" ss:Color="#000000"/>
  </ss:Style>
  <ss:Style ss:ID="s97">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s98">
   <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"
     ss:Color="#C0C0C0"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"
     ss:Color="#C0C0C0"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"
     ss:Color="#C0C0C0"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s99">
   <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"
     ss:Color="#C0C0C0"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"
     ss:Color="#C0C0C0"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"
     ss:Color="#C0C0C0"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s100">
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="8"/>
   <Interior ss:Color="#A5A5A5" ss:Pattern="Solid"/>
  </ss:Style>
  <ss:Style ss:ID="s101">
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="8"/>
   <Interior ss:Color="#A5A5A5" ss:Pattern="Solid"/>
  </ss:Style>
  <ss:Style ss:ID="s102">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Interior ss:Color="#A5A5A5" ss:Pattern="Solid"/>
  </ss:Style>
  <ss:Style ss:ID="s103">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Interior ss:Color="#A5A5A5" ss:Pattern="Solid"/>
  </ss:Style>
  <ss:Style ss:ID="s104">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Color="#000000"/>
   <Interior ss:Color="#A5A5A5" ss:Pattern="Solid"/>
  </ss:Style>
  <ss:Style ss:ID="s105">
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss"/>
   <Interior ss:Color="#A5A5A5" ss:Pattern="Solid"/>
  </ss:Style>
  <ss:Style ss:ID="s106">
   <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="8" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s107">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s108">
   <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s109">
   <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s110">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="8" ss:Color="#000000"/>
   <Interior/>
   <NumberFormat ss:Format="#,##0"/>
  </ss:Style>
  <ss:Style ss:ID="s111">
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
  </ss:Style>
  <ss:Style ss:ID="s112">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s113">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss"/>
  </ss:Style>
  <ss:Style ss:ID="s114">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12" ss:Color="#000000"/>
  </ss:Style>
  <ss:Style ss:ID="s115" ss:Parent="s49">
   <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s116" ss:Parent="s49">
   <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="12" ss:Color="#000000"/>
   <Interior/>
  </ss:Style>
  <ss:Style ss:ID="s117">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="9"/>
   <NumberFormat ss:Format="#,##0"/>
  </ss:Style>
  <ss:Style ss:ID="s118">
   <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:Family="Swiss" ss:Size="9" ss:Color="#000000"/>
  </ss:Style>
 </ss:Styles>
 <ss:Worksheet ss:Name="Sjösättning">
  <ss:Names>
   <NamedRange ss:Name="Print_Area" ss:RefersTo="=Sjösättning!R1C1:R40C13"/>
  </ss:Names>
  <ss:Table ss:ExpandedRowCount="61" x:FullColumns="1"
   x:FullRows="1">
   <ss:Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="39.75"/>
   <ss:Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="37.5"/>
   <ss:Column ss:AutoFitWidth="0" ss:Width="64.5"/>
   <ss:Column ss:AutoFitWidth="0" ss:Width="66"/>
   <ss:Column ss:Hidden="1" ss:AutoFitWidth="0" ss:Width="64.5"/>
   <ss:Column ss:AutoFitWidth="0" ss:Width="58.5"/>
   <ss:Column ss:AutoFitWidth="0" ss:Width="60"/>
   <ss:Column ss:StyleID="s63" ss:Width="21"/>
   <ss:Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="29.25"/>
   <ss:Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="34.5"/>
   <ss:Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="27"/>
   <ss:Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="26.25"/>
   <ss:Column ss:StyleID="s63" ss:AutoFitWidth="0" ss:Width="28.5"/>
   <ss:Column ss:StyleID="s63" ss:AutoFitWidth="0"/>

<?php
@mysql_connect($host,$usr,$pwd)
or die("<p>Kan ej ansluta till databasservern.</p>");
@mysql_select_db($db)
or die("<p>Kan ej ansluta till databasen " . $db . ".</p>");
$SQL1 = " SELECT id FROM medlem WHERE (upptagningsdatum = '$_POST[upptagningsdag]'  OR  upptagningsdatum_bat_2 = '$_POST[upptagningsdag]') AND (upptagningsupplagsplats = '$_POST[varv]' OR upptagningsupplagsplats_bat_2 = '$_POST[varv]' ) ";
$ret1 = mysql_query($SQL1);
if (!$ret1) { echo( mysql_error()); }
else {
$numcols = mysql_num_fields($ret1);
$numrows = mysql_num_rows($ret1);
}
$numberofrows = ($numrows+3);
?>
   <ss:Row ss:AutoFitHeight="0" ss:Height="15">
    <ss:Cell ss:StyleID="s64"><Data ss:Type="String">DAG</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s65"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s66"><Data ss:Type="String"><? echo $veckodag; ?></Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:MergeAcross="10" ss:MergeDown="2" ss:StyleID="m31465920"><Data
      ss:Type="String"><?php echo $_POST['varv']; ?></Data><NamedCell ss:Name="Print_Area"/></ss:Cell>
   </Row>
   <Row ss:AutoFitHeight="0" ss:Height="15">
    <ss:Cell ss:StyleID="s64"><Data ss:Type="String">DATUM</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s65"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <Cell ss:StyleID="s70"><Data ss:Type="DateTime"><? echo $upptagningsdag; ?></Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
   </ss:Row>
   <ss:Row ss:AutoFitHeight="0" ss:Height="6.75"/>
   <ss:Row>
    <ss:Cell ss:StyleID="s68"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s68"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s78"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s81"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s81"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s68"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s68"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s82"><Data ss:Type="String">Båt</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s67"><Data ss:Type="String">Traktor</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s78"><Data ss:Type="String">Förs-</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s68"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s68"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s68"><Data ss:Type="String">Betalt</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s68"/>
   </ss:Row>
   <ss:Row>
    <ss:Cell ss:StyleID="s69"><Data ss:Type="String">Tid</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s84"><Data ss:Type="String">Medlem</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:MergeAcross="1" ss:StyleID="m51662112"><Data ss:Type="String">Namn</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s75"><Data ss:Type="String">Adress</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s69"><Data ss:Type="String">Telefon</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s69"><Data ss:Type="String">Mobil</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s66"><Data ss:Type="String">SB</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s67"><Data ss:Type="String">Vagn</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s65"><Data ss:Type="String">bolag</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s84"><Data ss:Type="String">Skjul</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s84"><Data ss:Type="String">Varvpl</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s69"><Data ss:Type="String">Kvitto</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s88"><Data ss:Type="String">Båtplats</Data></ss:Cell>
   </ss:Row>
   <ss:Row ss:AutoFitHeight="0" ss:Height="15">
    <ss:Cell ss:StyleID="s79"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s79"><Data ss:Type="String">nr</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s76"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s77"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s75"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s69"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s69"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s68"><Data ss:Type="String">MB</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s68"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s65"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s79"><Data ss:Type="String">nr</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s79"><NamedCell ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s79"><Data ss:Type="String">Nr</Data><NamedCell
      ss:Name="Print_Area"/></ss:Cell>
    <ss:Cell ss:StyleID="s79"/>
   </ss:Row>
   
<?php
$SQL1 = " SELECT medlemsnr, fornamn, efternamn, telnr, mobilnr, upptagningsdatum, upptagnings_turnummer, batmodell, onskar_traktor, onskar_vagn, forsakringsbolag, skjulnummer, varvsplats, upptagningsdatum_bat_2, upptagnings_turnummer_bat_2, batmodell_bat_2, onskar_traktor_bat_2, onskar_vagn_bat_2, forsakringsbolag_bat_2, skjulnummer_bat_2, varvsplats_bat_2, upptagningsupplagsplats, upptagningsupplagsplats_bat_2, 
 CASE WHEN upptagningsdatum ='$_POST[upptagningsdag]' THEN upptagningsdatum ELSE upptagningsdatum_bat_2 END as `datum`,
 CASE WHEN upptagningsdatum ='$_POST[upptagningsdag]' THEN upptagnings_turnummer ELSE upptagnings_turnummer_bat_2 END as `turnummer`
 FROM medlem WHERE (upptagningsdatum = '$_POST[upptagningsdag]'  OR  upptagningsdatum_bat_2 = '$_POST[upptagningsdag]') AND (upptagningsupplagsplats = '$_POST[varv]' OR upptagningsupplagsplats_bat_2 = '$_POST[varv]' ) ORDER BY `turnummer` ";
$ret1 = mysql_query($SQL1);
if (!$ret1) { echo( mysql_error()); }
else {
while ($row = mysql_fetch_assoc($ret1))  {
$medlemsnr = $row['medlemsnr'];
$fornamn = $row['fornamn'];
$efternamn = $row['efternamn'];
$telnr = $row['telnr'];
$mobilnr = $row['mobilnr'];
$upptagningsdatum = $row['upptagningsdatum'];
//$upptagnings_turnummer = $row['upptagnings_turnummer'];
$batmodell = $row['batmodell'];
$onskar_traktor = $row['onskar_traktor'];
$onskar_vagn = $row['onskar_vagn'];
$forsakringsbolag = $row['forsakringsbolag'];
$skjulnummer = $row['skjulnummer'];
$varvsplats = $row['varvsplats_upptagning'];
$upptagningsdatum_bat_2 = $row['upptagningsdatum_bat_2'];
//$upptagnings_turnummer_bat_2 = $row['upptagnings_turnummer_bat_2'];
$batmodell_bat_2 = $row['batmodell_bat_2'];
$onskar_traktor_bat_2 = $row['onskar_traktor_bat_2'];
$onskar_vagn_bat_2 = $row['onskar_vagn_bat_2'];
$forsakringsbolag_bat_2 = $row['forsakringsbolag_bat_2'];
$skjulnummer_bat_2 = $row['skjulnummer_bat_2'];
$varvsplats_bat_2 = $row['varvsplats_upptagning_bat_2'];
$upptagningsupplagsplats = $row['upptagningsupplagsplats'];
$upptagningsupplagsplats_bat_2 = $row['upptagningsupplagsplats_bat_2'];
$datum = $row['datum'];
$turnummer = $row['turnummer'];
$batmodell = trim($batmodell," ");
$batmodell_bat_2 = trim($batmodell_bat_2," ");
if($batmodell == "segelbåt")  { $batmodellen = "SB";  }
if($batmodell == "motorbåt")  { $batmodellen = "MB";  }
if($batmodell_bat_2 == "segelbåt")  { $batmodellen = "SB";  }
if($batmodell_bat_2 == "motorbåt")  { $batmodellen = "MB";  }
if($onskar_traktor == "ja" || $onskar_traktor == "nej"  && $onskar_vagn == null)  
//echo "Medlemsnr: $medlemsnr, Varvsplats: $varvsplats, Upplagsplats: $upptagningsupplagsplats<br>";
{
	if($onskar_traktor == "ja")   { $traktor = "T";  }
	if($onskar_traktor == "nej")   { $traktor = "&nbsp;";  }
}

if($onskar_traktor == "ja" || $onskar_traktor == "nej"  && $onskar_vagn !== null ) 
{
	if($onskar_vagn == null && $onskar_traktor == "ja")   { $traktor = "T";  }
	if($onskar_vagn == "ja" && $onskar_traktor == "nej")   { $traktor = "V";  }
	if($onskar_vagn == "ja" && $onskar_traktor == "ja")   { $traktor = "V";  }
	if($onskar_vagn == null && $onskar_traktor == "nej")   { $traktor = "&nbsp;";  }
}

if($onskar_traktor_bat_2 == "ja" || $onskar_traktor_bat_2 == "nej"  && $onskar_vagn_bat_2 == null)  
{
	if($onskar_traktor_bat_2 == "ja")   { $traktor_bat_2 = "T";  }
	if($onskar_traktor_bat_2 == "nej")   { $traktor_bat_2 = "&nbsp;";  }
}

if($onskar_traktor_bat_2 == "ja" || $onskar_traktor_bat_2 == "nej"  && $onskar_vagn_bat_2 !== null) 
{
	if($onskar_vagn_bat_2 == null && $onskar_traktor_bat_2 == "ja")   { $traktor = "T";  }
	if($onskar_vagn_bat_2 == "ja" && $onskar_traktor_bat_2 == "nej")   { $traktor = "V";  }
	if($onskar_vagn_bat_2 == "ja" && $onskar_traktor_bat_2 == "ja")   { $traktor = "V";  }
	if($onskar_vagn_bat_2 == null && $onskar_traktor_bat_2 == "nej")   { $traktor = "&nbsp;";  }
}

$SQL11 ="SELECT perioder FROM launch_up WHERE dag = '$_POST[upptagningsdag]' AND varv='$_POST[varv]' ";
$ret11 = mysql_query($SQL11);
if (!$ret11) { echo( mysql_error()); }
else {
while ($row = mysql_fetch_array($ret11)) {
$perioder = $row["perioder"];
}}
if($upptagningsupplagsplats == "$varv_3_namn" || $upptagningsupplagsplats_bat_2 == "$varv_3_namn")  {
//Om Perioder == 1:
if($perioder > 0 && $perioder < 5)	{
if($turnummer == 1) {   $tiden = "8:00";   }
if($turnummer == 2) {   $tiden = "8:15";   }
if($turnummer == 3) {   $tiden = "8:30";   }
if($turnummer == 4) {   $tiden = "8:45";   }
if($turnummer == 5) {   $tiden = "9:00";   }
if($turnummer == 6) {   $tiden = "9:15";   }
if($turnummer == 7) {   $tiden = "9:30";   }

}
//Om Perioder == 1-2:
if($perioder > 1 && $perioder < 5) {
if($turnummer == 8) {   $tiden = "10:00";   }
if($turnummer == 9) {   $tiden = "10:15";   }
if($turnummer == 10) {   $tiden = "10:30";   }
if($turnummer == 11) {   $tiden = "10:45";   }
if($turnummer == 12) {   $tiden = "11:00";   }
if($turnummer == 13) {   $tiden = "11:15";   }
if($turnummer == 14) {   $tiden = "11:30";   }
if($turnummer == 15) {   $tiden = "11:45";   }

}
//Om Perioder == 1-3:
if($perioder > 2 && $perioder < 5) {
if($turnummer == 16) {   $tiden = "13:00";   }
if($turnummer == 17) {   $tiden = "13:15";   }
if($turnummer == 18) {   $tiden = "13:30";   }
if($turnummer == 19) {   $tiden = "13:45";   }
if($turnummer == 20) {   $tiden = "14:00";   }
if($turnummer == 21) {   $tiden = "14:15";   }
if($turnummer == 22) {   $tiden = "14:30";   }

}
//Om Perioder == 1-4:
if($perioder > 3  && $perioder < 5) {
if($turnummer == 23) {   $tiden = "15:00";   }
if($turnummer == 24) {   $tiden = "15:15";   }
if($turnummer == 25) {   $tiden = "15:30";   }
if($turnummer == 26) {   $tiden = "15:45";   }
if($turnummer == 27) {   $tiden = "16:00";   }
if($turnummer == 28) {   $tiden = "16:15";   }
if($turnummer == 29) {   $tiden = "16:30";   }
if($turnummer == 30) {   $tiden = "16:45";   }

}
//Turnummer börjar på 1 vid början av period 5.
//Om Perioder == 5:
if($perioder > 4  && $perioder < 7) {
if($turnummer == 1) {   $tiden = "17:00";   }
if($turnummer == 2) {   $tiden = "17:15";   }
if($turnummer == 3) {   $tiden = "17:30";   }
if($turnummer == 4) {   $tiden = "17:45";   }
if($turnummer == 5) {   $tiden = "18:00";   }
if($turnummer == 6) {   $tiden = "18:15";   }
if($turnummer == 7) {   $tiden = "18:30";   }
if($turnummer == 8) {   $tiden = "18:45";   }

}
//Om Perioder == 5-6:
if($perioder > 4  && $perioder < 7) {
if($turnummer == 9) {   $tiden = "19:30";   }
if($turnummer == 10) {   $tiden = "19:45";   }
if($turnummer == 11) {   $tiden = "20:00";   }
if($turnummer == 12) {   $tiden = "20:15";   }
if($turnummer == 13) {   $tiden = "20:30";   }
if($turnummer == 14) {   $tiden = "20:45";   }
if($turnummer == 15) {   $tiden = "21:00";   }
if($turnummer == 16) {   $tiden = "21:15";   }
}}
if($upptagningsupplagsplats == "$varv_4_namn")  {
if($perioder > 0 && $perioder < 7)	{
if($turnummer == 1) {   $tiden = "9:00";   }
if($turnummer == 2) {   $tiden = "10:00";   }
if($turnummer == 3) {   $tiden = "11:00";   }
if($turnummer == 4) {   $tiden = "13:00";   }
if($turnummer == 5) {   $tiden = "14:00";   }
if($turnummer == 6) {   $tiden = "15:00";   }
}}
if($perioder > 0 && $perioder < 5) { 
if($turnummer > 0 && $turnummer < 7 && $upptagningsupplagsplats == "$varv_3_namn")  {

		echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>";
}}
		
if($perioder > 1 && $perioder < 5) { 
if($turnummer > 7 && $turnummer < 15 && $upptagningsupplagsplats == "$varv_3_namn")  {
			echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>";
}}	

if($perioder > 2 && $perioder < 5) { 
if($turnummer > 15 && $turnummer < 22 && $upptagningsupplagsplats == "$varv_3_namn")  {
			echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>";
}}

if($perioder > 3 && $perioder < 5) { 
if($turnummer > 22 && $turnummer < 31 && $upptagningsupplagsplats == "$varv_3_namn")  {
				echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>";
}}

if($perioder > 4  && $perioder < 7 ) { 
if($turnummer > 0 && $turnummer < 8 && $upptagningsupplagsplats == "$varv_3_namn")  {
				echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>";
}}

if($perioder > 5  && $perioder < 7 ) { 
if($turnummer > 8 && $turnummer < 17 && $upptagningsupplagsplats == "$varv_3_namn")  {
				echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>";
}}

if($perioder > 0 && $perioder < 5 && $turnummer == 7 && $upptagningsupplagsplats == "$varv_3_namn")  {
echo "
   <ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>
      <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <Cell ss:MergeAcross=\"13\" ss:StyleID=\"s97\"><Data ss:Type=\"String\">KAFFERAST kl 9:45 -10:00</Data><NamedCell
      ss:Name=\"Print_Area\"/></Cell>
   </Row>";   }
   
if($perioder > 1 && $perioder < 5 && $turnummer == 15 && $upptagningsupplagsplats == "$varv_3_namn")  {
echo "
   <ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>
      <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <Cell ss:MergeAcross=\"13\" ss:StyleID=\"s97\"><Data ss:Type=\"String\">LUNCHRAST kl 12:00 -13:00</Data><NamedCell
      ss:Name=\"Print_Area\"/></Cell>
   </Row>";   }
  
if($perioder > 2 && $perioder < 5 && $turnummer == 22 && $upptagningsupplagsplats == "$varv_3_namn")  {
echo "
   <ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>
      <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <Cell ss:MergeAcross=\"13\" ss:StyleID=\"s97\"><Data ss:Type=\"String\">KAFFERAST kl 14:45 -15:00</Data><NamedCell
      ss:Name=\"Print_Area\"/></Cell>
   </Row>";   }

if($perioder > 4  && $perioder < 7 && $turnummer == 7 && $upptagningsupplagsplats == "$varv_3_namn")  {
echo "
   <ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>
      <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <Cell ss:MergeAcross=\"13\" ss:StyleID=\"s97\"><Data ss:Type=\"String\">KAFFERAST kl 17:45 -18:00</Data><NamedCell
      ss:Name=\"Print_Area\"/></Cell>
   </Row>";   }


//----  varv_4_namn:


if($perioder > 0 && $perioder < 3) { 
if($turnummer == 1 && $upptagningsupplagsplats == "$varv_4_namn")  {

		echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>
   <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <Cell ss:MergeAcross=\"13\" ss:StyleID=\"s97\"><Data ss:Type=\"String\">KAFFERAST kl 09:45 -10:00</Data><NamedCell
      ss:Name=\"Print_Area\"/></Cell>
   </Row>";
}}

if($perioder > 0 && $perioder < 3) { 
if($turnummer == 2 && $upptagningsupplagsplats == "$varv_4_namn")  {

		echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>
";
}}

if($perioder > 0 && $perioder < 3) { 
if($turnummer == 3 && $upptagningsupplagsplats == "$varv_4_namn")  {

		echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>
         <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <Cell ss:MergeAcross=\"13\" ss:StyleID=\"s97\"><Data ss:Type=\"String\">LUNCHRAST kl 12:00 -13:00</Data><NamedCell
      ss:Name=\"Print_Area\"/></Cell>
   </Row>";   
}}

if($perioder > 0 && $perioder < 3) { 
if($turnummer == 4 && $upptagningsupplagsplats == "$varv_4_namn")  {

		echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>
";
}}

if($perioder > 0 && $perioder < 3) { 
if($turnummer == 5 && $upptagningsupplagsplats == "$varv_4_namn")  {

		echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>
      <Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <Cell ss:MergeAcross=\"13\" ss:StyleID=\"s97\"><Data ss:Type=\"String\">KAFFERAST kl 14:45 -15:00</Data><NamedCell
      ss:Name=\"Print_Area\"/></Cell>
   </Row>";
}}

if($perioder > 0 && $perioder < 3) { 
if($turnummer == 6 && $upptagningsupplagsplats == "$varv_4_namn")  {

echo "
<ss:Row ss:AutoFitHeight=\"0\" ss:Height=\"15\">
    <ss:Cell ss:StyleID=\"s80\"><ss:Data  ss:Type=\"String\">$tiden</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s97\"><ss:Data  ss:Type=\"Number\">$medlemsnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s90\"><ss:Data  ss:Type=\"String\">$efternamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s91\"><ss:Data  ss:Type=\"String\">$fornamn</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s85\"><ss:Data  ss:Type=\"String\"> </ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$telnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s94\"><ss:Data  ss:Type=\"String\">$mobilnr</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$batmodellen</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$traktor</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\">$forsakringsbolag</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"Number\">$skjulnummer</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"><ss:Data  ss:Type=\"String\">$varvsplats</ss:Data><NamedCell
      ss:Name=\"Print_Area\"/></ss:Cell>      
    <ss:Cell ss:StyleID=\"s87\"><ss:Data  ss:Type=\"String\"></ss:Data></ss:Cell>
    <ss:Cell ss:StyleID=\"s86\"/>
   </ss:Row>";
   
   
   
}}}}
?>

</ss:Table>
<ss:WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <ss:PageSetup>
    <Header x:Data="&amp;C&amp;&quot;Arial,Fet&quot;&amp;18UPPTAGNINGSTIDER  för KRAN <? echo $ar; ?>"/>
   </ss:PageSetup>
   <FitToPage/>
   <ss:Print>
    <FitHeight>0</FitHeight>
    <ValidPrinterInfo/>
    <ss:PaperSizeIndex>9</ss:PaperSizeIndex>
    <Scale>85</Scale>
    <HorizontalResolution>1200</HorizontalResolution>
    <VerticalResolution>0</VerticalResolution>
   </ss:Print>
   <Selected/>
   <ss:Panes>
    <ss:Pane>
     <Number>3</Number>
     <ActiveRow>23</ActiveRow>
     <ActiveCol>6</ActiveCol>
    </ss:Pane>
   </ss:Panes>
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </ss:WorksheetOptions>
 </ss:Worksheet>
 <ss:DocumentProperties>
   <o:Author>Ericson Productions</o:Author>
   <o:LastAuthor>Lennart</o:LastAuthor>
   <o:LastPrinted>2009-06-07T19:02:13Z</o:LastPrinted>
   <o:Created>2010-03-23T13:29:15Z</o:Created>
   <o:LastSaved>2010-03-23T13:48:44Z</o:LastSaved>
   <o:Company>Enköpings Segelsällskap</o:Company>
   <o:Version>12.00</o:Version>
  </ss:DocumentProperties>
 <ss:ExcelWorkbook>
   <x:WindowHeight>2985</x:WindowHeight>
   <x:WindowWidth>3540</x:WindowWidth>
   <x:WindowTopX>14985</x:WindowTopX>
   <x:WindowTopY>2895</x:WindowTopY>
   <x:ProtectStructure>False</x:ProtectStructure>
   <x:ProtectWindows>False</x:ProtectWindows>
  </ss:ExcelWorkbook>
</ss:Workbook>

Open in new window

0
Comment
Question by:lericson
  • 3
  • 2
8 Comments
 
LVL 51

Expert Comment

by:HainKurt
ID: 33554650
can you please post the xml file created...
0
 
LVL 4

Expert Comment

by:thepanch
ID: 33555031
i guess the problem is that you are getting wrong values on cells B1 and G12, but watching your code, you dont need to do the template of the file, you just need to set the info.

the new way office 2007+ do the file, is just using xml, i suggest you to make a file on excel with the correct template you want, then unzip it (yes with winzip, right click and use winzip to open this file) and youll notice that the file is splited on several folders (the info, the template, the charts, etc etc), so the only thing you gotta do is find the source file (the only with data), and replace that file, with the correct xml you want, then you'll have a complete compatible office file.

i hope it works
0
 

Author Comment

by:lericson
ID: 33555040
Sorry, I don't know how to get the xml file out of the system. When I execute the script it comes automatically out as an Excel file. Please advice.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:lericson
ID: 33555236
thepanch:
Like your idea. Could you describe more in detail how to procede from when I have produced a new source file. I don't know how to tie it all together.

Say I have got all the data and populated the xml file. What should I do to produce a new xlsx file?
0
 
LVL 4

Accepted Solution

by:
thepanch earned 500 total points
ID: 33562252
ok my friend,

this is a xlsx file created with Excel,
it has information from CEll A to cell C
and from row 1 to 27 if my memory doesnt fail me
 once you unzipp it, you'll notice several things.

one:there are 3 folders (_rels, xl,) and one content_types
the _rels, and docProps folders i really dont know what they are doing, but the xli do :P

once again we have _rels, charts,drawings, printerSettings, theme, worksheets and 4 xml on the root.
well as you can see all the info is splited correctly, so the only thing you gotta do is to replace the worksheets/sheet(number) that you are working on, in my case i only used the first one.

Open that file and the xml is really fast to understand.

 <dimension ref="A2:C27" />  <-- the cells where you got info

- <sheetView tabSelected="1" workbookViewId="0"> <--the tab is gonna be selected by default
  <selection activeCell="K26" sqref="K26" />  <-- i really dont know
  </sheetView>
- <sheetData>
- <row r="2" spans="1:3">  <-- new row, on row 2 (the first one)

- <c r="A2" s="1" t="s">        <---- new collum (a2) size(1) type (string)
  <v>0</v>          <--- new value (0)
  </c>                 <--- end of row

Example of a formula value
- <c r="B3">
  <f>A3*2</f>   <--- cell a3 * 2
  <v>2</v>  <-- displayed value=2
  </c>

and so you can keep diging on the file and you'll find some nice stuff.



BTW thats why i said you create the right template on excel, so you keep the same style, but you only move the data ;)


I hope this help you.


test.xlsx
0
 

Author Closing Comment

by:lericson
ID: 33564589
Thanks for the explanation
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question