[PHPExcel] Uninitialized string offset
Bonjour à tous,
Je suis en train de créer un script php qui récupère des données dans une table et qui les écris dans un fichier .xls
Avec ce script tout marche parfaitement:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
$i=2;
$j=0;
while($uneligne=mysql_fetch_array($resultat))
{
$sheet->setCellValueByColumnAndRow($j,$i,$uneligne[0]);
$j++;
$sheet->setCellValueByColumnAndRow($j,$i,$uneligne[1]);
$j++;
$sheet->setCellValueByColumnAndRow($j,$i,$uneligne[2]);
$j++;
$sheet->setCellValueByColumnAndRow($j,$i,$uneligne[3]);
$j++;
$sheet->setCellValueByColumnAndRow($j,$i,$uneligne[4]);
$j++;
$sheet->setCellValueByColumnAndRow($j,$i,$uneligne[5]);
$i++;
$j=0;
} |
Mais en ajoutant une 7ieme colonne dans ma boucle:
Code:
1 2 3
|
$j++;
$sheet->setCellValueByColumnAndRow($j,$i,$uneligne[6]); |
j'ai un message d'erreur qui se répète ou moins sur 200 lignes
Code:
1 2
|
Uninitialized string offset: 22 in G:\ISD\BDD MySQL\EasyPHP-5.3.3\www\Outil_etat_parc\PHPExcel\Writer\Excel5\Parser.php on line 108 |
Quelqu'un peut-il m'aider?