Visualizzazione dei risultati da 1 a 9 su 9
  1. #1

    aiuto codice per pagina Lettura File Excel

    questo riportato è il codice io vorrei eliminare la visione delle lettere abcd... delle colonne e 12344 delle righe in modo da far vedere solo la tab centrale...
    vi allego l'url su cui sto provando il file...
    link

    ovviamente ringrazio tutti e scusate se non sono ai vostri livelli...!!!

    <?
    $allow_url_override = 1; // Set to 0 to not allow changed VIA POST or GET
    if(!$allow_url_override || !isset($file_to_include))
    {
    $file_to_include = "class.xls";
    }
    if(!$allow_url_override || !isset($max_rows))
    {
    $max_rows = 15; //USE 0 for no max
    }
    if(!$allow_url_override || !isset($max_cols))
    {
    $max_cols = 0; //USE 0 for no max
    }
    if(!$allow_url_override || !isset($debug))
    {
    $debug = 0; //1 for on 0 for off
    }
    if(!$allow_url_override || !isset($force_nobr))
    {
    $force_nobr = 1; //Force the info in cells not to wrap unless stated explicitly (newline)
    }

    require_once 'Excel/reader.php';
    $data = new Spreadsheet_Excel_Reader();
    $data->setOutputEncoding('CPa25a');
    $data->read($file_to_include);
    error_reporting(E_ALL ^ E_NOTICE);
    echo "
    <STYLE>
    .table_data
    {
    border-style:ridge;
    border-width:1;
    height: 25px;

    }
    .tab_base
    {
    background:#fff;
    font-weight:bold;
    border-style:ridge;
    border-width:0;
    cursorointer;
    }
    .table_sub_heading
    {
    background:#fff;
    font-weight:bold;
    border-style:ridge;
    border-width:0;
    }
    .table_body
    {
    background-image: url(tabella.png);
    color: #f00;
    text-align: center;
    font-wieght:normal;
    font-size:small;
    font-family:verdana;
    border-style:ridge;
    border-width:0;
    border-spacing: 0px;
    border-collapse: collapse;
    }
    .tab_loaded
    {
    background:#fff;
    color:#000;
    font-weight:bold;
    border-style:groove;
    border-width:0;
    cursorointer;
    }
    </STYLE>
    ";
    function make_alpha_from_numbers($number)
    {
    $numeric = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    if($number<strlen($numeric))
    {
    return $numeric[$number];
    }
    else
    {
    $dev_by = floor($number/strlen($numeric));
    return "" . make_alpha_from_numbers($dev_by-1) . make_alpha_from_numbers($number-($dev_by*strlen($numeric)));
    }
    }
    echo "<SCRIPT LANGUAGE='JAVASCRIPT'>
    var sheet_HTML = Array();\n";
    for($sheet=0;$sheet<count($data->sheets);$sheet++)
    {
    $table_output[$sheet] .= "<TABLE CLASS='table_body'>
    <TR>
    <TD></TD>";
    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>";
    }
    for($row=1;$row<=$data->sheets[$sheet]['numRows']&&($row<=$max_rows||$max_rows==0);$row++)
    {
    $table_output[$sheet] .= "<TR><TD CLASS='table_sub_heading' ALIGN=CENTER>" . $row . "</TD>";
    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']))
    {
    $table_output[$sheet] .= "<TD CLASS='table_data' $this_cell_colspan $this_cell_rowspan>";
    if($force_nobr)
    {
    $table_output[$sheet] .= "<NOBR>";
    }
    $table_output[$sheet] .= nl2br(htmlentities($data->sheets[$sheet]['cells'][$row][$col]));
    if($force_nobr)
    {
    $table_output[$sheet] .= "</NOBR>";
    }
    $table_output[$sheet] .= "</TD>";
    }
    }
    $table_output[$sheet] .= "</TR>";
    }
    $table_output[$sheet] .= "</TABLE>";
    $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] .= "<PRE>$debug_output</PRE>";
    }
    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').innerH TML=sheet_HTML[sheet];
    document.getElementById('sheet_tab_' + sheet).className = 'tab_loaded';

    }
    </SCRIPT>";
    echo "
    <TABLE CLASS='table_body' NAME='tab_table'>
    <TR>";
    for($sheet=0;$sheet<count($data->sheets);$sheet++)
    {
    echo "<TD CLASS='tab_base' ID='sheet_tab_$sheet' ALIGN=CENTER
    ONMOUSEDOWN=\"change_tabs($sheet);\">", $data->boundsheets[$sheet]['name'] , "</TD>";
    }

    echo
    "<TR>";
    echo "</TABLE>
    <DIV ID=table_loader_div></DIV>
    <SCRIPT LANGUAGE='JavaScript'>
    change_tabs(0);
    </SCRIPT>";

    //echo "<IFRAME NAME=table_loader_iframe SRC='about:blank' WIDTH=100 HEIGHT=100></IFRAME>";
    /*
    echo "<PRE>";
    print_r($data);
    echo "</PRE>";
    */

    ?>

  2. #2
    nessuno che può aiutarmi???

  3. #3
    ma, sinceramente, tu ti aspetti che qualcuno sia in grado di aiutarti? tu riesci a capire il codice che hai postato? personalmente io neanche un poco!

    Utilizza i tag appositi per il codice generico, ovvero il tag CODE, e per il codice php, ovvero il tag PHP, perché così è incomprensibile!!!

  4. #4
    non sono molto ferrato in materia codice mi sono limitato a copiare ed incollare...

  5. #5
    devi ripostare il codice utilizzando il bottoncino PHP o il bottoncino # che stanno subito sopra questa casella di testo -.-'

  6. #6
    codice:
    <style type="text/css">  </style> <div id="apDiv1"> <? $allow_url_override = 1; // Set to 0 to not allow changed VIA POST or GET if(!$allow_url_override || !isset($file_to_include)) { 	$file_to_include = "class.xls"; } if(!$allow_url_override || !isset($max_rows)) { 	$max_rows = 15; //USE 0 for no max } if(!$allow_url_override || !isset($max_cols)) { 	$max_cols = 0; //USE 0 for no max } if(!$allow_url_override || !isset($debug)) { 	$debug = 0;  //1 for on 0 for off } if(!$allow_url_override || !isset($force_nobr)) { 	$force_nobr = 1;  //Force the info in cells not to wrap unless stated explicitly (newline) }  require_once 'Excel/reader.php'; $data = new Spreadsheet_Excel_Reader(); $data->setOutputEncoding('CPa25a'); $data->read($file_to_include); error_reporting(E_ALL ^ E_NOTICE); echo " <STYLE> .table_data { 	 	border-style:ridge; 	border-width:1; 	height:20px; 	width:600px; } .tab_base { 	background:#C5D0DD; 	font-weight:bold; 	border-style:ridge; 	border-width:0; 	cursor:pointer; } .table_sub_heading { 	background:#CCCCCC; 	font-weight:bold; 	border-style:ridge; 	border-width:1; 	width:30px; 	 } .table_body { 	background-image: url(tabella.png); 	background-repeat: no-repeat; 	color: #f00; 	text-align: center; 	font-weight:bold; 	font-size:10; 	font-family:verdana; 	border-style:ridge; 	border-width:1; 	border-spacing: 0px; 	border-collapse: collapse; } .tab_loaded { 	background:#a3a5ab; 	color:white; 	font-weight:bold; 	border-style:groove; 	border-width:1; 	cursor:pointer; } </STYLE> "; function make_alpha_from_numbers($number) { 	$numeric = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 	if($number<strlen($numeric)) 	{ 		return $numeric[$number]; 	} 	else 	{ 		$dev_by = floor($number/strlen($numeric)); 		return "" . make_alpha_from_numbers($dev_by-1) . make_alpha_from_numbers($number-($dev_by*strlen($numeric))); 	} } echo "<SCRIPT LANGUAGE='JAVASCRIPT'> var sheet_HTML = Array();\n"; for($sheet=0;$sheet<count($data->sheets);$sheet++) { 	$table_output[$sheet] .= "<TABLE CLASS='table_body'> 	<TR> 		<TD></TD>"; 	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>"; 	} 	for($row=1;$row<=$data->sheets[$sheet]['numRows']&&($row<=$max_rows||$max_rows==0);$row++) 	{ 		$table_output[$sheet] .= "<TR><TD CLASS='table_sub_heading' ALIGN=CENTER>" . $row . "</TD>"; 		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'])) 			{ 				$table_output[$sheet] .= "<TD CLASS='table_data' $this_cell_colspan $this_cell_rowspan>"; 				if($force_nobr) 				{ 					$table_output[$sheet] .= "<NOBR>"; 				} 				$table_output[$sheet] .= nl2br(htmlentities($data->sheets[$sheet]['cells'][$row][$col])); 				if($force_nobr) 				{ 					$table_output[$sheet] .= "</NOBR>"; 				} 				$table_output[$sheet] .= "</TD>"; 			} 		} 		$table_output[$sheet] .= "</TR>"; 	} 	$table_output[$sheet] .= "</TABLE>"; 	$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] .= "<PRE>$debug_output</PRE>"; 	} 	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';  } </SCRIPT>"; echo " <TABLE CLASS='table_body' NAME='tab_table'> <TR>"; for($sheet=0;$sheet<count($data->sheets);$sheet++) { 	echo "<TD CLASS='tab_base' ID='sheet_tab_$sheet' ALIGN=CENTER 		ONMOUSEDOWN=\"change_tabs($sheet);\">", $data->boundsheets[$sheet]['name'] , "</TD>"; }  echo  "<TR>"; echo "</TABLE> <DIV ID=table_loader_div></DIV> <SCRIPT LANGUAGE='JavaScript'> change_tabs(0); </SCRIPT>";  //echo "<IFRAME NAME=table_loader_iframe SRC='about:blank' WIDTH=100 HEIGHT=100></IFRAME>"; /* echo "<PRE>"; print_r($data); echo "</PRE>"; */  ?></div>

  7. #7
    [scherzoso]mmm, pensavo fosse difficile fare peggio di prima, ma mi sbagliavo [/scherzoso]

    parlando seriamente, il tuo file è tutto su una riga? utilizzando i tag CODE e/o PHP il codice lo si vede esattamente cosi come lo si inserisce, quindi se lo inserisci tutto su un'unica riga si vedrà cosi, che è peggio di prima

  8. #8
    Codice PHP:
    <style type="text/css"> 
    <!-- 
    #apDiv1 {     
    position:absolute;     
    left:61px;     
    top:30px;     
    width:800px;     
    height:400px;     
    z-index:1; 
    }
     --> 
    </style> 
    <div id="apDiv1"> 
    <? 
    $allow_url_override 
    1// Set to 0 to not allow changed VIA POST or GET if(!$allow_url_override || !isset($file_to_include)) 
    $file_to_include "class.xls"; } 
    if(!
    $allow_url_override || !isset($max_rows)) 
    {     
    $max_rows 15//USE 0 for no max } 
    if(!$allow_url_override || !isset($max_cols)) 
    {     
    $max_cols 0//USE 0 for no max } 
    if(!$allow_url_override || !isset($debug)) 
    {     
    $debug 0;  //1 for on 0 for off } 
    if(!$allow_url_override || !isset($force_nobr)) 
    {     
    $force_nobr 1;  //Force the info in cells not to wrap unless stated explicitly (newline) }  
    require_once 'Excel/reader.php'
    $data = new Spreadsheet_Excel_Reader(); 
    $data->setOutputEncoding('CPa25a'); 
    $data->read($file_to_include); 
    error_reporting(E_ALL E_NOTICE); 
    echo 

    <STYLE> 
    .table_data 
    {          
    border-style:ridge;     
    border-width:1;     
    height:20px;     
    width:600px; 

    .tab_base 
    {     
    background:#C5D0DD;     
    font-weight:bold;     
    border-style:ridge;     
    border-width:0;     
    cursor:pointer; 

    .table_sub_heading 
    {     
    background:#CCCCCC;     
    font-weight:bold;     
    border-style:ridge;     
    border-width:1;     
    width:30px;      

    .table_body 
    {     
    background-image: url(tabella.png);     
    background-repeat: no-repeat;     
    color: #f00;     
    text-align: center;     
    font-weight:bold;     
    font-size:10;     
    font-family:verdana;     
    border-style:ridge;     
    border-width:1;     
    border-spacing: 0px;     
    border-collapse: collapse; 

    .tab_loaded 
    {     
    background:#a3a5ab;     
    color:white;     
    font-weight:bold;     
    border-style:groove;     
    border-width:1;     
    cursor:pointer;
     } 
    </STYLE> 
    "

    function 
    make_alpha_from_numbers($number)
    {     
    $numeric "ABCDEFGHIJKLMNOPQRSTUVWXYZ";     
    if(
    $number<strlen($numeric))     
    {         
    return 
    $numeric[$number];     
    }     
    else 
    {         
    $dev_by floor($number/strlen($numeric));         
    return 
    "" make_alpha_from_numbers($dev_by-1) .make_alpha_from_numbers($number-($dev_by*strlen($numeric)));     


    echo 
    "<SCRIPT LANGUAGE='JAVASCRIPT'> 
    var sheet_HTML = Array();\n"

    for(
    $sheet=0;$sheet<count($data->sheets);$sheet++) 
    {
    $table_output[$sheet] .= "<TABLE CLASS='table_body'>     
    <TR>         
    <TD></TD>"
    ;     
    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>";     
    }     
    for(
    $row=1;$row<=$data->sheets[$sheet]['numRows']&&($row<=$max_rows||$max_rows==0);$row++) 
    {         
    $table_output[$sheet] .= "<TR><TD CLASS='table_sub_heading' ALIGN=CENTER>" $row "</TD>";         
    for(
    $col=1;$col<=$data->sheets[$sheet]['numCols']&&($col<=$max_cols||$max_cols==0);$col++)
    {
    if(
    $data->sheets[$sheet]['cellsInfo'][$row][$col]['colspan'] >=&& $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']))             

    $table_output[$sheet] .= "<TD CLASS='table_data' $this_cell_colspan $this_cell_rowspan>";
    if(
    $force_nobr

    $table_output[$sheet] .= "<NOBR>";

    $table_output[$sheet] .= nl2br(htmlentities($data->sheets[$sheet]['cells'][$row][$col])); 
    if(
    $force_nobr
    {         
    $table_output[$sheet] .= "</NOBR>";
    }     
    $table_output[$sheet] .= "</TD>";     
    }
    }
    $table_output[$sheet] .= "</TR>";     
    }     
    $table_output[$sheet] .= "</TABLE>"
    $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] .= "<PRE>$debug_output</PRE>";
    }
    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';
    }
     </SCRIPT>"
    ;
    echo 

    <TABLE CLASS='table_body' NAME='tab_table'> 
    <TR>"
    ;
    for(
    $sheet=0;$sheet<count($data->sheets);$sheet++) 
    {
    echo 
    "<TD CLASS='tab_base' ID='sheet_tab_$sheet' ALIGN=CENTER         ONMOUSEDOWN=\"change_tabs($sheet);\">"$data->boundsheets[$sheet]['name'] , "</TD>";
    }
    echo  
    "<TR>";
    echo 
    "</TABLE>
    <DIV ID=table_loader_div></DIV> 
    <SCRIPT LANGUAGE='JavaScript'> 
    change_tabs(0); 
    </SCRIPT>"
    ;  
    //echo "<IFRAME NAME=table_loader_iframe SRC='about:blank' WIDTH=100 HEIGHT=100></IFRAME>"; /* 
    echo "<PRE>"
    print_r($data); 
    echo 
    "</PRE>"
    */  
    ?>
    </div>
    spero ho fatto meglio... ci ho messo un bel po'....

  9. #9
    Originariamente inviato da daniele_dll
    [scherzoso]mmm, pensavo fosse difficile fare peggio di prima, ma mi sbagliavo [/scherzoso]

    parlando seriamente, il tuo file è tutto su una riga? utilizzando i tag CODE e/o PHP il codice lo si vede esattamente cosi come lo si inserisce, quindi se lo inserisci tutto su un'unica riga si vedrà cosi, che è peggio di prima
    Onestamente lui ha fatto quanto suggerito: ha cliccato sui pulsanti in alto e ha incollato il testo. Non e' colpa sua se questo forum e' fatto male.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.