Visualizzazione dei risultati da 1 a 4 su 4

Discussione: leggere foglio excel

  1. #1
    Utente di HTML.it
    Registrato dal
    Nov 2000
    Messaggi
    190

    leggere foglio excel

    Sto provando phpReaderExcel ed ho scritto il seguente codice:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>prova.php</title>
    </head>

    <body>

    <?php


    require_once 'Excel/reader.php';

    $data = new Spreadsheet_Excel_Reader();

    $data->setOutputEncoding('CP1251');

    $data->read('Prova.xls');

    error_reporting(E_ALL ^ E_NOTICE);

    echo "<table border='1'>";

    for ($i = 1; $i <= $data->sheets[0]['numRows']; $i++)
    {
    echo "<tr>";

    for ($j = 1; $j <= $data->sheets[0]['numCols']; $j++)
    {
    echo "<td>".$data->sheets[0]['cells'][$i][$j]."</td>";
    }
    echo "</tr>";
    }
    echo "</table>";


    ?>

    </body>
    </html>



    ....però all'istruzione $data->read('Prova.xls');

    non esegue più niente. Mettendo degli echo "(o)";

    di test, vedo che il codice arriva sino a li.

    Sapete dove stò sbagliando?


    Grazie. Walter

  2. #2
    Utente di HTML.it
    Registrato dal
    Nov 2000
    Messaggi
    190
    Nessuno che possa aiutarmi?

  3. #3
    Utente di HTML.it
    Registrato dal
    Nov 2000
    Messaggi
    190
    La mia versione di php è 4.2.3

    Può essere un problema?

  4. #4
    Utente di HTML.it
    Registrato dal
    Nov 2000
    Messaggi
    190
    c'è un anima compassionevole che possa risolvere il mio problema???

    Grazie. Walter

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.