mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 23:52:24 +01:00
Fix: bug sur le nombre de colonne enregistr
This commit is contained in:
@@ -622,7 +622,7 @@ if ($step == 4 && $datatoexport)
|
|||||||
// test d'affichage du tableau excel
|
// test d'affichage du tableau excel
|
||||||
/*
|
/*
|
||||||
print '<table width="100%"><tr><td>';
|
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>';
|
print '</td></tr></table>';
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,26 +146,25 @@ class ExportExcel extends ModeleExports
|
|||||||
|
|
||||||
function write_record($array_alias,$array_selected_sorted,$objp)
|
function write_record($array_alias,$array_selected_sorted,$objp)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$this->col=0;
|
$this->col=0;
|
||||||
foreach($array_selected_sorted as $code => $value)
|
foreach($array_selected_sorted as $code => $value)
|
||||||
|
{
|
||||||
|
$alias=$array_alias[$code];
|
||||||
|
$newvalue=$objp->$alias;
|
||||||
|
// Nettoyage newvalue
|
||||||
|
$newvalue=clean_html($newvalue);
|
||||||
|
// Traduction newvalue
|
||||||
|
if (eregi('^\((.*)\)$',$newvalue,$reg))
|
||||||
{
|
{
|
||||||
$alias=$array_alias[$code];
|
$newvalue=$langs->transnoentities($reg[1]);
|
||||||
$newvalue=$objp->$alias;
|
}
|
||||||
// Nettoyage newvalue
|
$this->worksheet->write($this->row, $this->col, $newvalue);
|
||||||
$newvalue=clean_html($newvalue);
|
$this->col++;
|
||||||
// Traduction newvalue
|
}
|
||||||
if (eregi('^\((.*)\)$',$newvalue,$reg))
|
$this->row++;
|
||||||
{
|
return 0;
|
||||||
$newvalue=$langs->transnoentities($reg[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->worksheet->write($this->row, $this->col, $newvalue);
|
|
||||||
$this->col++;
|
|
||||||
}
|
|
||||||
$this->row++;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1904,9 +1904,9 @@ function set_row() {
|
|||||||
$record = 0x0200; // Record identifier
|
$record = 0x0200; // Record identifier
|
||||||
$length = 0x000A; // Number of bytes to follow
|
$length = 0x000A; // Number of bytes to follow
|
||||||
$row_min = $this->_dim_rowmin; // First row
|
$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_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
|
$reserved = 0x0000; // Reserved by Excel
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
|
|||||||
@@ -3355,7 +3355,7 @@ function viewExcelFileContent($file_to_include='',$max_rows=0,$max_cols=0)
|
|||||||
$data->setOutputEncoding('CPa25a');
|
$data->setOutputEncoding('CPa25a');
|
||||||
$data->read($file_to_include);
|
$data->read($file_to_include);
|
||||||
error_reporting(E_ALL ^ E_NOTICE);
|
error_reporting(E_ALL ^ E_NOTICE);
|
||||||
|
|
||||||
echo "<script language='Javascript'>
|
echo "<script language='Javascript'>
|
||||||
var sheet_HTML = Array();\n";
|
var sheet_HTML = Array();\n";
|
||||||
for($sheet=0;$sheet<count($data->sheets);$sheet++)
|
for($sheet=0;$sheet<count($data->sheets);$sheet++)
|
||||||
@@ -3363,7 +3363,7 @@ function viewExcelFileContent($file_to_include='',$max_rows=0,$max_cols=0)
|
|||||||
$table_output[$sheet] .= "<TABLE CLASS='table_body'>
|
$table_output[$sheet] .= "<TABLE CLASS='table_body'>
|
||||||
<TR>
|
<TR>
|
||||||
<TD> </TD>";
|
<TD> </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>";
|
$table_output[$sheet] .= "<TD CLASS='table_sub_heading' ALIGN=CENTER>" . make_alpha_from_numbers($i) . "</TD>";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user