convert excel file to mysql database using php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vinitaJ
    New Member
    • Aug 2007
    • 1

    #1

    convert excel file to mysql database using php

    hi i need to convert a excel sheet to mysql database format using php code.I am not getting any help on the net on this topic.I need the code not an autogeneration tool.If any of you can solve the problem please post the answer :
    i have 1.>Book.xls,2.> Mysql database on a server
    Thank You.
  • jx2
    New Member
    • Feb 2007
    • 228

    #2
    the simpliest way to do it woud be saving your data as "comma" separated text file not an excell file
    if you want to use excell file you need to write binary on your own(that means a lot of work!!)
    i did something like that for jpeg(exif data) if you need that for excell you need to find the description of excell file format and you need to know how to handle binaries

    your only hope is that there is someone who did it before and share the code
    :-)

    regards
    jx2

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Heya, vinitaJ. Welcome to TSDN!

      As jx2 suggested, your best course is to save the file in CSV ('comma-separated values') format. Then, you can use MySQL's LOAD DATA INFILE command.

      Comment

      Working...