setOutputEncoding('UTF-8'); $data->setOutputEncoding('SJIS'); $data->setUTFEncoder('mb'); #$data->setOutputEncoding('CPa25a'); $data->read($file_to_include); error_reporting(E_ALL ^ E_NOTICE); /* */ /* */ function make_alpha_from_numbers($number) { $numeric = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; if($number var sheet_HTML = Array();\n"; for($sheet=0;$sheetsheets);$sheet++) { # Get basic Cell format values from Excel $table_output[$sheet] .= ""; for($i=0;$i<$data->sheets[$sheet]['numCols']&&($i<=$max_cols||$max_cols==0);$i++) { $table_output[$sheet] .= ""; # $table_output[$sheet] .= ""; } for($row=1;$row<=$data->sheets[$sheet]['numRows']&&($row<=$max_rows||$max_rows==0);$row++) { # $table_output[$sheet] .= ""; $table_output[$sheet] .= ""; for($col=1;$col<=$data->sheets[$sheet]['numCols']&&($col<=$max_cols||$max_cols==0);$col++) { if($data->sheets[$sheet]['cellsInfo'][$row][$col]['colspan'] >=1 && $data->sheets[$sheet]['cellsInfo'][$row][$col]['rowspan'] >=1) { $this_cell_colspan = " COLSPAN=" . $data->sheets[$sheet]['cellsInfo'][$row][$col]['colspan']; $this_cell_rowspan = " ROWSPAN=" . $data->sheets[$sheet]['cellsInfo'][$row][$col]['rowspan']; for($i=1;$i<$data->sheets[$sheet]['cellsInfo'][$row][$col]['colspan'];$i++) { $data->sheets[$sheet]['cellsInfo'][$row][$col+$i]['dontprint']=1; } for($i=1;$i<$data->sheets[$sheet]['cellsInfo'][$row][$col]['rowspan'];$i++) { for($j=0;$j<$data->sheets[$sheet]['cellsInfo'][$row][$col]['colspan'];$j++) { $data->sheets[$sheet]['cellsInfo'][$row+$i][$col+$j]['dontprint']=1; } } } else if($data->sheets[$sheet]['cellsInfo'][$row][$col]['colspan'] >=1) { $this_cell_colspan = " COLSPAN=" . $data->sheets[$sheet]['cellsInfo'][$row][$col]['colspan']; $this_cell_rowspan = ""; for($i=1;$i<$data->sheets[$sheet]['cellsInfo'][$row][$col]['colspan'];$i++) { $data->sheets[$sheet]['cellsInfo'][$row][$col+$i]['dontprint']=1; } } else if($data->sheets[$sheet]['cellsInfo'][$row][$col]['rowspan'] >=1) { $this_cell_colspan = ""; $this_cell_rowspan = " ROWSPAN=" . $data->sheets[$sheet]['cellsInfo'][$row][$col]['rowspan']; for($i=1;$i<$data->sheets[$sheet]['cellsInfo'][$row][$col]['rowspan'];$i++) { $data->sheets[$sheet]['cellsInfo'][$row+$i][$col]['dontprint']=1; } } else { $this_cell_colspan = ""; $this_cell_rowspan = ""; } if(!($data->sheets[$sheet]['cellsInfo'][$row][$col]['dontprint'])) { $style = $data->style($row,$col,$sheet); $table_output[$sheet] .= ""; } } $table_output[$sheet] .= ""; } $table_output[$sheet] .= "
  " . make_alpha_from_numbers($i) . "
" . $row . "
 "; if($force_nobr) { $table_output[$sheet] .= ""; } $val = $data->sheets[$sheet]['cells'][$row][$col]; if ($val=='') { $val=" "; } else { # $val = htmlentities($val); $val = htmlspecialchars($val); $link = $data->hyperlink($row,$col,$sheet); if ($link!='') { $val = "$val"; } } # $table_output[$sheet] .= nl2br(htmlentities($data->sheets[$sheet]['cells'][$row][$col])); $table_output[$sheet] .= nl2br($val); # $table_output[$sheet] .= nl2br(htmlspecialchars($data->sheets[$sheet]['cells'][$row][$col])); # $table_output[$sheet] .= $data->sheets[$sheet]['cells'][$row][$col]; if($force_nobr) { $table_output[$sheet] .= ""; } $table_output[$sheet] .= "
"; $table_output[$sheet] = str_replace("\n","",$table_output[$sheet]); $table_output[$sheet] = str_replace("\r","",$table_output[$sheet]); $table_output[$sheet] = str_replace("\t"," ",$table_output[$sheet]); if($debug) { $debug_output = print_r($data->sheets[$sheet],true); $debug_output = str_replace("\n","\\n",$debug_output); $debug_output = str_replace("\r","\\r",$debug_output); $table_output[$sheet] .= "
$debug_output
"; } echo "sheet_HTML[$sheet] = \"$table_output[$sheet]\";\n"; } echo " function change_tabs(sheet) { //alert('sheet_tab_' + sheet); for(i=0;i<" , count($data->sheets) , ";i++) { document.getElementById('sheet_tab_' + i).className = 'tab_base'; } document.getElementById('table_loader_div').innerHTML=sheet_HTML[sheet]; document.getElementById('sheet_tab_' + sheet).className = 'tab_loaded'; } "; echo " "; for($sheet=0;$sheetsheets);$sheet++) { echo ""; } echo ""; echo "
", $data->boundsheets[$sheet]['name'] , "
"; require_once 'page_trailer.php'; //echo ""; /* echo "
";
print_r($data);
echo "
"; */ ?>