@@ 224-228 (lines=5) @@ | ||
221 | unlink($pFilename); |
|
222 | } |
|
223 | // Try opening the ZIP file |
|
224 | if ($objZip->open($pFilename, $zipOverWrite) !== true) { |
|
225 | if ($objZip->open($pFilename, $zipCreate) !== true) { |
|
226 | throw new \PhpOffice\PhpSpreadsheet\Writer\Exception('Could not open ' . $pFilename . ' for writing.'); |
|
227 | } |
|
228 | } |
|
229 | ||
230 | // Add [Content_Types].xml to ZIP file |
|
231 | $objZip->addFromString('[Content_Types].xml', $this->getWriterPart('ContentTypes')->writeContentTypes($this->spreadSheet, $this->includeCharts)); |
@@ 155-159 (lines=5) @@ | ||
152 | unlink($pFilename); |
|
153 | } |
|
154 | // Try opening the ZIP file |
|
155 | if ($objZip->open($pFilename, $zipOverWrite) !== true) { |
|
156 | if ($objZip->open($pFilename, $zipCreate) !== true) { |
|
157 | throw new \PhpOffice\PhpSpreadsheet\Writer\Exception("Could not open $pFilename for writing."); |
|
158 | } |
|
159 | } |
|
160 | ||
161 | return $objZip; |
|
162 | } |