69 $this->writerPartContent =
new Content($this);
70 $this->writerPartMeta =
new Meta($this);
71 $this->writerPartMetaInf =
new MetaInf($this);
72 $this->writerPartMimetype =
new Mimetype($this);
73 $this->writerPartSettings =
new Settings($this);
74 $this->writerPartStyles =
new Styles($this);
75 $this->writerPartThumbnails =
new Thumbnails($this);
118 public function save($pFilename): void
120 if (!$this->spreadSheet) {
125 $this->spreadSheet->garbageCollect();
132 $zip->addFile(
'Thumbnails/thumbnail.png', $this->getWriterPartthumbnails()->
write());
133 $zip->addFile(
'content.xml', $this->getWriterPartcontent()->
write());
134 $zip->addFile(
'meta.xml', $this->getWriterPartmeta()->
write());
135 $zip->addFile(
'mimetype', $this->getWriterPartmimetype()->
write());
136 $zip->addFile(
'settings.xml', $this->getWriterPartsettings()->
write());
137 $zip->addFile(
'styles.xml', $this->getWriterPartstyles()->
write());
157 if (!is_resource($this->fileHandle)) {
164 $options->setOutputStream($this->fileHandle);
176 if ($this->spreadSheet !== null) {
192 $this->spreadSheet = $spreadsheet;
getSpreadsheet()
Get Spreadsheet object.
createZip()
Create zip object.
save($pFilename)
Save PhpSpreadsheet to file.
getWriterPartThumbnails()
setSpreadsheet(Spreadsheet $spreadsheet)
Set Spreadsheet object.
__construct(Spreadsheet $spreadsheet)
Create a new Ods.
openFileHandle($filename)
Open file handle.
maybeCloseFileHandle()
Close file handle only if we opened it ourselves.