73,6 → 73,11 |
else { |
$obs_ids = self::rangeToList(trim($_POST['range'])); |
} |
|
$params['format'] = 'CSV'; |
if($_POST['format'] == 'xls') $params['format'] = 'Excel5'; |
if($_POST['format'] == 'xlsx') $params['format'] = 'Excel2007'; |
|
$this->export($obs_ids, NULL, $params); |
exit; |
} |
144,6 → 149,15 |
) |
); |
} |
if(! $colonne['importable']) { |
$feuille->getStyleByColumnAndRow($colid, 1)->getFill()->applyFromArray( |
array( |
'type' => PHPExcel_Style_Fill::FILL_SOLID, |
'color' => array('rgb' => PHPExcel_Style_Color::COLOR_YELLOW) |
) |
); |
} |
|
$colid++; |
} |
|
189,9 → 203,10 |
header("Content-Type: application/vnd.ms-excel"); |
header("Content-Disposition: attachment; filename=\"liste.xls\"; charset=utf-8"); |
header("Cache-Control: max-age=0"); |
// Le format Excel2007 utilise un fichier temporaire |
$generateur = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); |
// $generateur = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); |
|
// csv|xls|xlsx => CSV|Excel5|Excel2007 |
// Note: le format Excel2007 utilise un fichier temporaire |
$generateur = PHPExcel_IOFactory::createWriter($objPHPExcel, $params['format']); |
$generateur->save('php://output'); |
exit; |
} |
237,11 → 252,11 |
if(isset($groupe_de_champs['standard'])) { |
$colonnes += Array( |
'nom_sel' => self::GenColInfo('nom_sel', 'Espèce'), |
'nom_sel_nn' => self::GenColInfo('nom_sel_nn', 'Numéro nomenclatural'), |
'nom_ret' => self::GenColInfo('nom_ret', 'Nom retenu'), |
'nom_ret_nn' => self::GenColInfo('nom_ret_nn', 'Numéro nomenclatural nom retenu'), |
'nt' => self::GenColInfo('nt', 'Numéro taxonomique'), |
'famille' => self::GenColInfo('famille', 'Famille'), |
'nom_sel_nn' => self::GenColInfo('nom_sel_nn', 'Numéro nomenclatural', 0, NULL, NULL, FALSE), |
'nom_ret' => self::GenColInfo('nom_ret', 'Nom retenu', 0, NULL, NULL, FALSE), |
'nom_ret_nn' => self::GenColInfo('nom_ret_nn', 'Numéro nomenclatural nom retenu', 0, NULL, NULL, FALSE), |
'nt' => self::GenColInfo('nt', 'Numéro taxonomique', 0, NULL, NULL, FALSE), |
'famille' => self::GenColInfo('famille', 'Famille', 0, NULL, NULL, FALSE), |
'nom_referentiel' => self::GenColInfo('nom_referentiel', 'Referentiel taxonomique'), |
'zone_geo' => self::GenColInfo('zone_geo', 'Commune'), |
'ce_zone_geo' => self::GenColInfo('ce_zone_geo', 'Identifiant Commune', 0, 'convertirCodeZoneGeoVersDepartement'), |
252,7 → 267,7 |
'commentaire' => self::GenColInfo('commentaire', 'Notes'), |
'latitude' => self::GenColInfo('latitude', 'Latitude', 1), |
'longitude' => self::GenColInfo('longitude', 'Longitude', 1), |
'geodatum' => self::GenColInfo('geodatum', 'Référentiel Géographique', 1), |
'geodatum' => self::GenColInfo('geodatum', 'Référentiel Géographique', 1, NULL, NULL, FALSE), |
|
// TODO: importable = FALSE car pas de merge de données importées |
'ordre' => self::GenColInfo('ordre', 'Ordre', 1, NULL, NULL, FALSE), |
260,23 → 275,23 |
|
'mots_cles_texte' => self::GenColInfo('mots_cles_texte', 'Mots Clés', 1), |
'commentaire' => self::GenColInfo('commentaire', 'Commentaires', 1), |
'date_creation' => self::GenColInfo('date_creation', 'Date Création', 1), |
'date_modification' => self::GenColInfo('date_modification', 'Date Modification', 1), |
'date_creation' => self::GenColInfo('date_creation', 'Date Création', 1, NULL, NULL, FALSE), |
'date_modification' => self::GenColInfo('date_modification', 'Date Modification', 1, NULL, NULL, FALSE), |
|
// rappel transmission = 1, signifie simplement "public" |
// des données importées peuvent être d'emblée "publiques" |
// "importable" = TRUE |
'transmission' => self::GenColInfo('transmission', 'Transmis', 1), |
'date_transmission' => self::GenColInfo('date_transmission', 'Date Transmission', 1), |
'abondance' => self::GenColInfo('abondance', 'Abondance', 1, NULL, NULL, FALSE), |
'certitude' => self::GenColInfo('certitude', 'Certitude', 1, NULL, NULL, FALSE), |
'phenologie' => self::GenColInfo('phenologie', 'Phénologie', 1, NULL, NULL, FALSE), |
'date_transmission' => self::GenColInfo('date_transmission', 'Date Transmission', 1, NULL, NULL, FALSE), |
'abondance' => self::GenColInfo('abondance', 'Abondance', 1), |
'certitude' => self::GenColInfo('certitude', 'Certitude', 1), |
'phenologie' => self::GenColInfo('phenologie', 'Phénologie', 1), |
|
'nom_commun' => self::GenColInfo('nom_commun', 'Nom Commun', 1, NULL, 'getNomCommun', FALSE), |
//'nom-commun' => self::GenColInfo('nom-commun', 'Nom Commun', 1, NULL, 'getNomCommun_v2'), |
//'nom-commun' => self::GenColInfo('nom-commun', 'Nom Commun', 1, NULL, 'getNomCommun_v3'), |
|
'images' => self::GenColInfo('image', 'Image(s)', 1, NULL, 'getImages', TRUE), |
'images' => self::GenColInfo('images', 'Image(s)', 1, NULL, 'getImages', TRUE), |
); |
} |
|