Conditions | 2 |
Paths | 2 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function buildWorkbookXML() |
||
28 | { |
||
29 | $i = 0; |
||
30 | $xml = ''; |
||
31 | $xml .= $this->xml; |
||
32 | $xml .= '<workbook xmlns="'.$this->urlOpenXmlFormat.'" xmlns:r="'.$this->urlSchemaFormat.'/relationships">'; |
||
33 | $xml .= '<fileVersion appName="Calc"/><workbookPr backupFile="false"'; |
||
34 | $xml .= ' showObjects="all" date1904="false"/><workbookProtection/>'; |
||
35 | $xml .= '<bookViews><workbookView activeTab="0" firstSheet="0" showHorizontalScroll="true"'; |
||
36 | $xml .= ' showSheetTabs="true" showVerticalScroll="true" tabRatio="212" windowHeight="8192"'; |
||
37 | $xml .= ' windowWidth="16384" xWindow="0" yWindow="0"/></bookViews>'; |
||
38 | $xml .= '<sheets>'; |
||
39 | /** @var Sheet $sheet */ |
||
40 | foreach ($this->sheets as $sheet_name => $sheet) { |
||
41 | $xml .= '<sheet name="'.str_replace("'", "'", htmlspecialchars($sheet->getSheetName())).'"'; |
||
42 | $xml .= ' sheetId="'.($i + 1).'" state="visible" r:id="rId'.($i + 2).'"/>'; |
||
43 | $i++; |
||
44 | } |
||
45 | $xml .= '</sheets>'; |
||
46 | $xml .= '<calcPr iterateCount="100" refMode="A1" iterate="false" iterateDelta="0.001"/></workbook>'; |
||
47 | |||
48 | return $xml; |
||
49 | } |
||
50 | |||
63 |