Merge 9d17164604d8fea024d7678813380a12d0e730c4 into c6cfc4c80f457b7c6fc0cf070542dcfbcc1fbace
This commit is contained in:
commit
276a6e4b36
@ -205,4 +205,3 @@ abstract class AbstractWriter implements WriterInterface
|
||||
$this->isWriterOpened = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ class Workbook
|
||||
$worksheetFilesFolder = $this->fileSystemHelper->getXlWorksheetsFolder();
|
||||
$worksheet = new Worksheet($sheet, $worksheetFilesFolder, $this->sharedStringsHelper, $this->shouldUseInlineStrings);
|
||||
$this->worksheets[] = $worksheet;
|
||||
|
||||
|
||||
return $worksheet;
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,15 @@ class Sheet
|
||||
$this->name = self::DEFAULT_SHEET_NAME_PREFIX . ($sheetNumber + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sheetName The custom name of the sheet
|
||||
* @return void
|
||||
*/
|
||||
public function setName($sheetName)
|
||||
{
|
||||
$this->name = $sheetName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int Number of the sheet, based on order of creation (zero-based)
|
||||
*/
|
||||
|
@ -125,6 +125,18 @@ class XLSX extends AbstractWriter
|
||||
return $this->book->getCurrentWorksheet()->getExternalSheet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the the workbook for the XLSX file
|
||||
*
|
||||
* @return Book The workbook for the XLSX file
|
||||
* @throws \Box\Spout\Writer\Exception\WriterNotOpenedException If the writer has not been opened yet
|
||||
*/
|
||||
public function getBook()
|
||||
{
|
||||
$this->throwIfBookIsNotAvailable();
|
||||
return $this->book;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the given sheet as the current one. New data will be written to this sheet.
|
||||
* The writing will resume where it stopped (i.e. data won't be truncated).
|
||||
|
Loading…
x
Reference in New Issue
Block a user