Console.php
6 years ago
Csv.php
6 years ago
Html.php
6 years ago
Json.php
6 years ago
Php.php
6 years ago
Rss.php
6 years ago
Tsv.php
6 years ago
Xml.php
6 years ago
Tsv.php
39 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Piwik - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | * |
| 8 | */ |
| 9 | namespace Piwik\DataTable\Renderer; |
| 10 | |
| 11 | /** |
| 12 | * TSV export |
| 13 | * |
| 14 | * Excel doesn't import CSV properly, it expects TAB separated values by default. |
| 15 | * TSV is therefore the 'CSV' that is Excel compatible |
| 16 | * |
| 17 | */ |
| 18 | class Tsv extends Csv |
| 19 | { |
| 20 | /** |
| 21 | * Constructor |
| 22 | */ |
| 23 | public function __construct() |
| 24 | { |
| 25 | parent::__construct(); |
| 26 | $this->setSeparator("\t"); |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Computes the dataTable output and returns the string/binary |
| 31 | * |
| 32 | * @return string |
| 33 | */ |
| 34 | public function render() |
| 35 | { |
| 36 | return parent::render(); |
| 37 | } |
| 38 | } |
| 39 |