Subversion Repositories eFlore/Applications.cel

Rev

Rev 1611 | Rev 1617 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1611 Rev 1612
Line 152... Line 152...
152
	private function convertirEnXls($data) {		
152
	private function convertirEnXls($data) {		
153
		$this->extendSpreadsheetProductor = new SpreadsheetProductor();
153
		$this->extendSpreadsheetProductor = new SpreadsheetProductor();
154
		$this->extendSpreadsheetProductor->initSpreadsheet();
154
		$this->extendSpreadsheetProductor->initSpreadsheet();
Line 155... Line 155...
155
		
155
		
-
 
156
		$workbook = new Spreadsheet_Excel_Writer();
Line 156... Line 157...
156
		$workbook = new Spreadsheet_Excel_Writer();
157
		$workbook->setVersion(8);
-
 
158
 
157
 
159
		$worksheet = $workbook->addWorksheet('Liste');
Line 158... Line 160...
158
		$worksheet = $workbook->addWorksheet('Liste');
160
		$worksheet->setInputEncoding('utf-8');
Line 159... Line 161...
159
		$workbook->send($this->nom_fichier_export.'.xls');
161
		$workbook->send($this->nom_fichier_export.'.xls');
Line 166... Line 168...
166
			if(empty($intitule_champs)) {
168
			if(empty($intitule_champs)) {
167
				$intitule_champs = $this->creerEntetesChamps($ligne);
169
				$intitule_champs = $this->creerEntetesChamps($ligne);
168
				$indice = 0;
170
				$indice = 0;
169
				foreach ($intitule_champs as $intitule) {	
171
				foreach ($intitule_champs as $intitule) {	
170
					$colonne = $intitule_champs[$indice];
172
					$colonne = $intitule_champs[$indice];
171
					$colonne = mb_convert_encoding($colonne, 'ISO-8859-15', 'UTF-8');
-
 
172
					$worksheet->write(0,$indice,$colonne);
173
					$worksheet->write(0,$indice,$colonne);
173
					$indice++;
174
					$indice++;
174
				}
175
				}
175
			}
176
			}
176
			$indice = 0;
177
			$indice = 0;
177
			foreach($ligne as $champ) {
178
			foreach($ligne as $champ) {
178
				$champ = mb_convert_encoding($champ, 'ISO-8859-15', 'UTF-8');
-
 
179
				$worksheet->write($nb_lignes,$indice,$champ);
179
				$worksheet->write($nb_lignes,$indice,$champ);
180
				$indice++;
180
				$indice++;
181
			}
181
			}
182
			$nb_lignes++;
182
			$nb_lignes++;
183
		}
183
		}