public function export()
    {
        $headers = $this->fileHeaders();
        $rows = $this->rows();

        $writer = Writer::createFromFileObject(new SplTempFileObject());
        $writer->setNewline("\r\n");
        $writer->setOutputBOM(Writer::BOM_UTF8);
        $writer->insertOne($headers);

        foreach ($rows as $r) {
            $writer->insertOne($r);
        }

        $writer->output($this->filename());
    }