Fix: bug sur le nombre de colonne enregistr

This commit is contained in:
Regis Houssin
2007-09-09 16:30:01 +00:00
parent 6fe53dbb2d
commit 48c7d36518
4 changed files with 22 additions and 23 deletions

View File

@@ -622,7 +622,7 @@ if ($step == 4 && $datatoexport)
// test d'affichage du tableau excel
/*
print '<table width="100%"><tr><td>';
viewExcelFileContent($conf->export->dir_temp.'/1/export_commande_1.xls');
viewExcelFileContent($conf->export->dir_temp.'/1/export_commande_1.xls',5);
print '</td></tr></table>';
*/
}

View File

@@ -160,7 +160,6 @@ class ExportExcel extends ModeleExports
{
$newvalue=$langs->transnoentities($reg[1]);
}
$this->worksheet->write($this->row, $this->col, $newvalue);
$this->col++;
}

View File

@@ -1904,9 +1904,9 @@ function set_row() {
$record = 0x0200; // Record identifier
$length = 0x000A; // Number of bytes to follow
$row_min = $this->_dim_rowmin; // First row
$row_max = $this->_dim_rowmax; // Last row plus 1
$row_max = $this->_dim_rowmax + 1; // Last row plus 1
$col_min = $this->_dim_colmin; // First column
$col_max = $this->_dim_colmax; // Last column plus 1
$col_max = $this->_dim_colmax + 1; // Last column plus 1
$reserved = 0x0000; // Reserved by Excel
$header = pack("vv", $record, $length);

View File

@@ -3363,7 +3363,7 @@ function viewExcelFileContent($file_to_include='',$max_rows=0,$max_cols=0)
$table_output[$sheet] .= "<TABLE CLASS='table_body'>
<TR>
<TD>&nbsp;</TD>";
for($i=0;$i<$data->sheets[$sheet]['numCols']&&($i<=$max_cols||$max_cols==0);$i++)
for($i=0;$i < $data->sheets[$sheet]['numCols'] && (($i < $max_cols) || ($max_cols == 0));$i++)
{
$table_output[$sheet] .= "<TD CLASS='table_sub_heading' ALIGN=CENTER>" . make_alpha_from_numbers($i) . "</TD>";
}