View Full Version : import excell in php
05-29-2011, 02:46 PM
i want to know how to import an excell file into my database using PHP?
05-29-2011, 05:10 PM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.