importing the data from XLS file to php with simple coding
I have the excel file with the following fields
First Middle Last Email michael j jackson michael@plantgenomesciences.com mary j wats开发者_如何学运维on mary@microsoft.com jeff a bridges jeff@rediff.com nick h gill nick@gill.com
If possible please tell me how can i get the data from Name Box (K8) from the same file
I want to know how can import this data into the php (I m able to upload the excel file on the server)
by using simple code (not any premade script)
Typically for files like spreadsheets, CSV import is most used. You can export excel file to csv. and then import it using PHP.
See http://in.php.net/manual/en/function.fgetcsv.php
But it seems you are looking to read excel files, you may need help of third-party libraries for that. You also have a look at the following article:
http://www.ibm.com/developerworks/opensource/library/os-phpexcel/
You won't be able to write any simple code to read a BIFF file yourself in any reasonable timeframe. Your only quick solution, given an unwillingness to use a library capable of reading BIFF files, is to convert it to a different format (such as CSV) before uploading it.
Alternatively, if you're on a windows server, you could try using PHP's COM extension (as long as you install MS Excel on your server)
精彩评论