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

addRowsWithStyle() public method

Write given data to the output and apply the given style.
See also: addRows
public addRowsWithStyle ( array $dataRows, Style $style ) : AbstractWriter
$dataRows array Array of array containing data to be streamed.
$style Box\Spout\Writer\Style\Style Style to be applied to the rows.
return AbstractWriter
    public function addRowsWithStyle(array $dataRows, $style)
    {
        if (!$style instanceof Style\Style) {
            throw new InvalidArgumentException('The "$style" argument must be a Style instance and cannot be NULL.');
        }
        $this->setRowStyle($style);
        $this->addRows($dataRows);
        $this->resetRowStyleToDefault();
        return $this;
    }