'group' => __('Groupe'),
);
- /* $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_memcache;
- $cacheSettings = array('memcacheServer' => 'localhost',
- 'memcachePort' => 11211,
- 'cacheTime' => 600
- );
- PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); */
-
-
$comments = array();
$xls = new PHPExcel();
if (is_bool($l[$id])) {
$l[$id] = $l[$id] ? 1 : 0;
}
- if ($id == 'numerotation') {
- if ($l[$id] == 'false') {
+ if ($id === 'numerotation') {
+ if ($l[$id] === 'false') {
$l[$id] = 'physical';
}
}
- if ($id == 'to' && in_array($l['type'], array(2))) {
+ if ($id === 'to' && $l['type'] == 2) {
$comment = false;
if (!Zend_Uri_Http::check($l[$id])) {
$comment = 'Invalid URI';
if ($comment) {
$s->getComment(PHPExcel_Cell::stringFromColumnIndex($j - 1) . $i)->getText()->createTextRun($comment);
}
-
+ }
+ if ($id === 'to') {
+ $s->getCellByColumnAndRow($i, $j)->setDataType(PHPExcel_Cell_DataType::TYPE_STRING)->getStyle()->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_TEXT);
}
$value = $l[$id];
} else {
}
}
if ($value != '') {
- $s->setCellValueByColumnAndRow($i, $j, $value);
+ $s->setCellValueExplicitByColumnAndRow($i, $j, $value);
//$s->getStyleByColumnAndRow($i, $j)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);
}
$i++;