Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2008
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    import excell in php

    i want to know how to import an excell file into my database using PHP?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Saving an actual document is a matter of using a blob type in your database and plugging the binary in (via a simple fopen to fread/fpassthru call). If you intend to use the data in the columns, that will require extensively more work from a standard document. Excel is not an open type, which means you need to either write a custom handling for it which involves a lot of bit work (and trial and error since I haven't found structure information about excel (2003 mind you) on the MS website), or find a package that already exists to do it.
    Alternatively, an export of the document to a simple type such as xml or csv will allow much easier parsing for storage in the database. This can then be parsed using a dom/simplexml walk or fgetcsv.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •