Create excel (.xls) files from PHP data

Discussion in 'PHP' started by KingCobra, Sep 20, 2010.

  1. #1
    Friends,

    I need your help. I need to create an excel (.xls) file form php page.

    Suppose,
    I have some string data in a php variable-

    $mydata = "My text here 01<br>My text here 02<br>My text here 03";
    PHP:
    I wanto to create a link or button that prompt me to download that file.

    The downloadable file: An excel file just with those three line printed in three rows.

    PLEASE HELP ME
    Thanks in advance
     
    KingCobra, Sep 20, 2010 IP
  2. canishk

    canishk Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try using PEAR Package for doing the same. Package SpreadSheet can be used to create excel sheets.
     
    canishk, Sep 21, 2010 IP
  3. ashishkg

    ashishkg Active Member

    Messages:
    233
    Likes Received:
    8
    Best Answers:
    3
    Trophy Points:
    68
    #3
    This will help you

    http://afruj.wordpress.com/2008/05/08/save-report-as-excel-file-from-php/
     
    ashishkg, Sep 21, 2010 IP
  4. Cotillion

    Cotillion Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Cotillion, Sep 21, 2010 IP