function _sheetnode_phpexcel_get_cellformat in Sheetnode 7.2
Same name and namespace in other branches
- 5 modules/sheetnode_phpexcel/sheetnode_phpexcel.import.inc \_sheetnode_phpexcel_get_cellformat()
- 6 modules/sheetnode_phpexcel/sheetnode_phpexcel.import.inc \_sheetnode_phpexcel_get_cellformat()
- 7 modules/sheetnode_phpexcel/sheetnode_phpexcel.import.inc \_sheetnode_phpexcel_get_cellformat()
1 call to _sheetnode_phpexcel_get_cellformat()
- _sheetnode_phpexcel_import_cell in modules/
sheetnode_phpexcel/ sheetnode_phpexcel.import.inc
File
- modules/
sheetnode_phpexcel/ sheetnode_phpexcel.import.inc, line 489 - Import sheetnodes through PHPExcel for xls or xlsx spreadsheets.
Code
function _sheetnode_phpexcel_get_cellformat($style) {
$cellformats = array(
PHPExcel_Style_Alignment::HORIZONTAL_GENERAL => FALSE,
PHPExcel_Style_Alignment::HORIZONTAL_LEFT => 'left',
PHPExcel_Style_Alignment::HORIZONTAL_CENTER => 'center',
PHPExcel_Style_Alignment::HORIZONTAL_RIGHT => 'right',
PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY => 'justify',
PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS => 'center',
);
return $cellformats[$style
->getAlignment()
->getHorizontal()];
}