|
| | addNewSheetAndMakeItCurrent () |
| | Creates a new sheet and make it the current sheet.
|
| |
| | addRow (Row $row) |
| | {Appends a row to the end of the stream.- Parameters
-
| Row | $row | The row to be appended to the stream |
- Exceptions
-
- Return values
-
}
|
| |
| | addRows (array $rows) |
| | {Appends the rows to the end of the stream.- Parameters
-
| Row[] | $rows | The rows to be appended to the stream |
- Exceptions
-
- Return values
-
}
|
| |
| | close () |
| | {Closes the writer.This will close the streamer as well, preventing new data to be written to the file.- Return values
-
}
|
| |
| | getCurrentSheet () |
| | Returns the current sheet.
|
| |
| | getSheets () |
| | Returns all the workbook's sheets.
|
| |
| | openToBrowser ($outputFileName) |
| | @codeCoverageIgnore {Initializes the writer and opens it to accept data.By using this method, the data will be outputted directly to the browser.- Parameters
-
| string | $outputFileName | Name of the output file that will contain the data. If a path is passed in, only the file name will be kept |
- Exceptions
-
- Return values
-
}
|
| |
| | openToFile ($outputFilePath) |
| | {Initializes the writer and opens it to accept data.By using this method, the data will be written to a file.- Parameters
-
| string | $outputFilePath | Path of the output file that will contain the data |
- Exceptions
-
- Return values
-
}
|
| |
| | setCurrentSheet ($sheet) |
| | Sets the given sheet as the current one.
|
| |
| | setDefaultRowStyle (Style $defaultStyle) |
| | {Sets the default styles for all rows added with "addRow".Overriding the default style instead of using "addRowWithStyle" improves performance by 20%. - See also
- https://github.com/box/spout/issues/272
- Parameters
-
- Return values
-
}
|
| |
| | setShouldCreateNewSheetsAutomatically ($shouldCreateNewSheetsAutomatically) |
| | Sets whether new sheets should be automatically created when the max rows limit per sheet is reached.
|
| |
| | setTempFolder ($tempFolder) |
| | Sets a custom temporary folder for creating intermediate files/folders.
|
| |
|
| | addRowToWriter (Row $row) |
| | {Adds a row to the currently opened writer.- Parameters
-
| Row | $row | The row containing cells and styles |
- Exceptions
-
- Return values
-
}
|
| |
| | closeWriter () |
| | {Closes the streamer, preventing any additional writing.- Return values
-
}
|
| |
| | openWriter () |
| | {Opens the streamer and makes it ready to accept data.- Exceptions
-
- Return values
-
}
|
| |
| | throwIfFilePointerIsNotAvailable () |
| | Checks if the pointer to the file/stream to write to is available.
|
| |
| | throwIfWorkbookIsNotAvailable () |
| | Checks if the workbook has been created.
|
| |
| | throwIfWriterAlreadyOpened ($message) |
| | Checks if the writer has already been opened, since some actions must be done before it gets opened.
|
| |
|
|
resource | $filePointer |
| | Pointer to the file/stream we will write to.
|
| |
|
GlobalFunctionsHelper | $globalFunctionsHelper |
| | Helper to work with global functions.
|
| |
|
HelperFactory | $helperFactory |
| |
|
bool | $isWriterOpened = false |
| | Indicates whether the writer has been opened or not.
|
| |
|
OptionsManagerInterface | $optionsManager |
| | Writer options manager.
|
| |
|
string | $outputFilePath |
| | Path to the output file.
|
| |
|
|
static string | $headerContentType = 'application/vnd.oasis.opendocument.spreadsheet' |
| | Content-Type value for the header.
|
| |
◆ addNewSheetAndMakeItCurrent()
| Box\Spout\Writer\WriterMultiSheetsAbstract::addNewSheetAndMakeItCurrent |
( |
| ) |
|
|
inherited |
Creates a new sheet and make it the current sheet.
The data will now be written to this sheet.
- Exceptions
-
| WriterNotOpenedException | If the writer has not been opened yet |
- Return values
-
◆ addRow()
| Box\Spout\Writer\WriterAbstract::addRow |
( |
Row | $row | ) |
|
|
inherited |
◆ addRows()
| Box\Spout\Writer\WriterAbstract::addRows |
( |
array | $rows | ) |
|
|
inherited |
◆ addRowToWriter()
| Box\Spout\Writer\WriterMultiSheetsAbstract::addRowToWriter |
( |
Row | $row | ) |
|
|
protectedinherited |
{Adds a row to the currently opened writer.
- Parameters
-
| Row | $row | The row containing cells and styles |
- Exceptions
-
- Return values
-
}
Reimplemented from Box\Spout\Writer\WriterAbstract.
◆ close()
| Box\Spout\Writer\WriterAbstract::close |
( |
| ) |
|
|
inherited |
{Closes the writer.This will close the streamer as well, preventing new data to be written to the file.
- Return values
-
}
Implements Box\Spout\Writer\WriterInterface.
◆ closeWriter()
| Box\Spout\Writer\WriterMultiSheetsAbstract::closeWriter |
( |
| ) |
|
|
protectedinherited |
◆ getCurrentSheet()
| Box\Spout\Writer\WriterMultiSheetsAbstract::getCurrentSheet |
( |
| ) |
|
|
inherited |
Returns the current sheet.
- Exceptions
-
| WriterNotOpenedException | If the writer has not been opened yet |
- Return values
-
◆ getSheets()
| Box\Spout\Writer\WriterMultiSheetsAbstract::getSheets |
( |
| ) |
|
|
inherited |
Returns all the workbook's sheets.
- Exceptions
-
| WriterNotOpenedException | If the writer has not been opened yet |
- Return values
-
| Sheet[] | All the workbook's sheets |
◆ openToBrowser()
| Box\Spout\Writer\WriterAbstract::openToBrowser |
( |
| $outputFileName | ) |
|
|
inherited |
@codeCoverageIgnore {Initializes the writer and opens it to accept data.By using this method, the data will be outputted directly to the browser.
- Parameters
-
| string | $outputFileName | Name of the output file that will contain the data. If a path is passed in, only the file name will be kept |
- Exceptions
-
- Return values
-
}
Implements Box\Spout\Writer\WriterInterface.
◆ openToFile()
| Box\Spout\Writer\WriterAbstract::openToFile |
( |
| $outputFilePath | ) |
|
|
inherited |
{Initializes the writer and opens it to accept data.By using this method, the data will be written to a file.
- Parameters
-
| string | $outputFilePath | Path of the output file that will contain the data |
- Exceptions
-
- Return values
-
}
Implements Box\Spout\Writer\WriterInterface.
◆ openWriter()
| Box\Spout\Writer\WriterMultiSheetsAbstract::openWriter |
( |
| ) |
|
|
protectedinherited |
◆ setCurrentSheet()
| Box\Spout\Writer\WriterMultiSheetsAbstract::setCurrentSheet |
( |
| $sheet | ) |
|
|
inherited |
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).
- Parameters
-
| Sheet | $sheet | The sheet to set as current |
- Exceptions
-
| WriterNotOpenedException | If the writer has not been opened yet |
| SheetNotFoundException | If the given sheet does not exist in the workbook |
- Return values
-
◆ setDefaultRowStyle()
| Box\Spout\Writer\WriterAbstract::setDefaultRowStyle |
( |
Style | $defaultStyle | ) |
|
|
inherited |
◆ setShouldCreateNewSheetsAutomatically()
| Box\Spout\Writer\WriterMultiSheetsAbstract::setShouldCreateNewSheetsAutomatically |
( |
| $shouldCreateNewSheetsAutomatically | ) |
|
|
inherited |
Sets whether new sheets should be automatically created when the max rows limit per sheet is reached.
This must be set before opening the writer.
- Parameters
-
| bool | $shouldCreateNewSheetsAutomatically | Whether new sheets should be automatically created when the max rows limit per sheet is reached |
- Exceptions
-
| WriterAlreadyOpenedException | If the writer was already opened |
- Return values
-
| WriterMultiSheetsAbstract | |
◆ setTempFolder()
| Box\Spout\Writer\ODS\Writer::setTempFolder |
( |
| $tempFolder | ) |
|
Sets a custom temporary folder for creating intermediate files/folders.
This must be set before opening the writer.
- Parameters
-
| string | $tempFolder | Temporary folder where the files to create the ODS will be stored |
- Exceptions
-
- Return values
-
◆ throwIfFilePointerIsNotAvailable()
| Box\Spout\Writer\WriterAbstract::throwIfFilePointerIsNotAvailable |
( |
| ) |
|
|
protectedinherited |
Checks if the pointer to the file/stream to write to is available.
Will throw an exception if not available.
- Exceptions
-
- Return values
-
◆ throwIfWorkbookIsNotAvailable()
| Box\Spout\Writer\WriterMultiSheetsAbstract::throwIfWorkbookIsNotAvailable |
( |
| ) |
|
|
protectedinherited |
Checks if the workbook has been created.
Throws an exception if not created yet.
- Exceptions
-
| WriterNotOpenedException | If the workbook is not created yet |
- Return values
-
◆ throwIfWriterAlreadyOpened()
| Box\Spout\Writer\WriterAbstract::throwIfWriterAlreadyOpened |
( |
| $message | ) |
|
|
protectedinherited |
Checks if the writer has already been opened, since some actions must be done before it gets opened.
Throws an exception if already opened.
- Parameters
-
| string | $message | Error message |
- Exceptions
-
| WriterAlreadyOpenedException | If the writer was already opened and must not be. |
- Return values
-
The documentation for this class was generated from the following file:
- lib/spout/src/Spout/Writer/ODS/Writer.php