faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

41 of 69 people (59%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Is there a mean to get the entries of an EXCEL sheet with PHP (to include this in a database, by Example

May 6th, 2008 21:29
dman, Vishal Sharma, Chris Hayes, Pavel Prishivalko, Jean-charles Bontemps, http://www.ttnr.org


1)
Yes, using COM architecture (only  for Windows).
Look at the columns of phpbuilder.com - the answer is there :)
2) 
You can save the Excel data as a *.csv file and read the data into 
MySQL (look in the MySQL manual section 8.3.3).
3) 
There is an Excel script to write Excel data into a template file so 
you may write an include file, for instance if Excel chart looks like 
this:
  ID   URL                   description          
   1   http://lsyg.com       bla
   2   http://pmoj.com       dibla
You could make an template file like this
 <?php
 [repeat]
 $url[]=( [COL1] , '[COL2]' , '[COL3]' );
 [end repeat]
 ?>
End it would output
 <?php
 $url[]=(1 ,  'http://sturly.com' , 'bla' );
 $url[]=(2 ,  'http://dnamewiz.com' , 'dibla' );
 ?>
Which you can then upload.
http://www.xs4all.nl/~chayes/wave.html  (Dutch)