How can transfer a table from a Mysql db to an Excel sheet?

Discussion in 'PHP' started by coderbari, May 15, 2007.

  1. #1
    Can anyone help me to transfer a table from mysql to excel?any open source link or any readymade script will be great help for me.
     
    coderbari, May 15, 2007 IP
  2. programmersbank

    programmersbank Peon

    Messages:
    184
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You may use PHPMyAdmin but it will be export your tables into .csv format and csv format can open in excel, once you open in excel, save this file with .xls extensions
     
    programmersbank, May 15, 2007 IP
  3. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #3
    csv is text format,
    for binary excel file use the class I attach, it's not mine
     

    Attached Files:

    gibex, May 15, 2007 IP
  4. coderbari

    coderbari Well-Known Member

    Messages:
    3,168
    Likes Received:
    193
    Best Answers:
    0
    Trophy Points:
    135
    #4
    thank you gibex for the scripts.it is helpful.thanks a lot.
     
    coderbari, May 15, 2007 IP
  5. kkibak

    kkibak Peon

    Messages:
    1,083
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Keep in mind that for the vast majority of things you can take the other guys advice and just use PHPMyAdmin and export as CSV.

    Of course it depends on your specific needs, but don't waste time setting up classes and (relatively) complex code if you can just use PHPMyAdmin.
     
    kkibak, May 15, 2007 IP
  6. coderbari

    coderbari Well-Known Member

    Messages:
    3,168
    Likes Received:
    193
    Best Answers:
    0
    Trophy Points:
    135
    #6
    thanks for your suggestion.
    yes trying it from PHPMyAdmin is an easy solution,but the scripts those he attached was also helpful.everything has an alternative.
    His scripts were only an alternative and it was helpful for me :)
     
    coderbari, May 15, 2007 IP
  7. kkibak

    kkibak Peon

    Messages:
    1,083
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Oh good, I didn't mean it the way I think it might have sounded. Definitely give the classes a try if you need to do complex stuff, but I've wasted many hours trying to figure out other peoples' class code and was just trying to spare you that if possible :).
     
    kkibak, May 15, 2007 IP