Box\Spout\Writer\AbstractWriter::openToFile PHP Method

openToFile() public method

By using this method, the data will be written to a file.
public openToFile ( string $outputFilePath ) : AbstractWriter
$outputFilePath string Path of the output file that will contain the data
return AbstractWriter
    public function openToFile($outputFilePath)
    {
        $this->outputFilePath = $outputFilePath;
        $this->filePointer = $this->globalFunctionsHelper->fopen($this->outputFilePath, 'wb+');
        $this->throwIfFilePointerIsNotAvailable();
        $this->openWriter();
        $this->isWriterOpened = true;
        return $this;
    }