Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/export/format/PhabricatorExcelExportFormat.php
Context not available. | |||||
} | } | ||||
return pht(<<<EOHELP | return pht(<<<EOHELP | ||||
Data can not be exported to Excel because the PHPExcel library is not | Data can not be exported to Excel because the PhpSpreadsheet library is not | ||||
installed. This software component is required for Phabricator to create | installed. This software component is required for Phabricator to create | ||||
Excel files. | Excel files. | ||||
You can install PHPExcel from GitHub: | You can install PhpSpreadsheet from GitHub: | ||||
> https://github.com/PHPOffice/PHPExcel | > https://github.com/PHPOffice/PhpSpreadsheet/ | ||||
Briefly: | Briefly: | ||||
- Clone that repository somewhere on the sever | - Clone that repository somewhere on the sever | ||||
(like `/path/to/example/PHPExcel`). | (like `/path/to/example/PhpSpreadsheet`). | ||||
- Update your PHP `%s` setting (in `php.ini`) to include the PHPExcel | - Update your PHP `%s` setting (in `php.ini`) to include the PhpSpreadsheet | ||||
`Classes` directory (like `/path/to/example/PHPExcel/Classes`). | `src` directory (like `/path/to/example/PhpSpreadsheet/src`). | ||||
EOHELP | EOHELP | ||||
, | , | ||||
'include_path'); | 'include_path'); | ||||
Context not available. | |||||
} | } | ||||
/** | /** | ||||
* @phutil-external-symbol class PHPExcel_Cell_DataType | * @phutil-external-symbol class \PhpOffice\PhpSpreadsheet\Cell\DataType | ||||
*/ | */ | ||||
public function addHeaders(array $fields) { | public function addHeaders(array $fields) { | ||||
$sheet = $this->getSheet(); | $sheet = $this->getSheet(); | ||||
Context not available. | |||||
$return_cell = true); | $return_cell = true); | ||||
$sheet->getStyle($cell_name)->applyFromArray($header_format); | $sheet->getStyle($cell_name)->applyFromArray($header_format); | ||||
$cell->setDataType(PHPExcel_Cell_DataType::TYPE_STRING); | $cell->setDataType(\PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_STRING); | ||||
$width = $field->getCharacterWidth(); | $width = $field->getCharacterWidth(); | ||||
if ($width !== null) { | if ($width !== null) { | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0