Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Lettura dati Ms Excel

  1. #1
    Utente di HTML.it L'avatar di C232
    Registrato dal
    Dec 2004
    Messaggi
    303

    Lettura dati Ms Excel

    Ragazzi ho trovato questo codice per il web:

    codice:
    <?PHP
        $filename = "sheet.xls";
        header ("Content-Type: application/vnd.ms-excel");
        header ("Content-Disposition: inline; filename=$filename");
    ?>
    <table border="1">
    <?PHP
        for ($i=1; $i<11; $i++)
        {
            echo "<tr>";
            for ($x=1; $x<11;$x++)
            {
                $r = $i * $x;
                echo "<td>$r</td>";
            }
            echo "</tr>";
        }
    ?>
    </table>
    però stavo pensando se lo uso e qualcuno non ha Ms Excel come fa?
    Come posso risolvere il problema? Verificando magari se il computer avetta questo mime-types: header ("Content-Type: application/vnd.ms-excel");?
    C/C++

  2. #2
    Utente di HTML.it L'avatar di C232
    Registrato dal
    Dec 2004
    Messaggi
    303

    ...

    up
    C/C++

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.