Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 PHP to excel
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
alt+f4




PostPosted: Tue Mar 20, 2007 10:08 am   Post subject: PHP to excel

I have a question about i script i made for a website i am working on. There is a html form feild that asks the user to enter their priority code to enter the rest to the site. Currently the priority code is written to a .txt file also the date when the user entered that code is written to the file. My question is would it be possible to write all that information to an microsoft excel file because right now it is very hard to read the collected information.

you can view and exemple of this script here www.ejayforschools.com enter the priority code "compsci" without the quotes

Thanks in advance [/url]
Sponsor
Sponsor
Sponsor
sponsor
rdrake




PostPosted: Tue Mar 20, 2007 10:23 am   Post subject: Re: PHP to excel

Excel uses a not-so-open format with the extension .xls. However, it can also open up various other formats. The easiest way to do this would probably be to export to a CSV (Comma Separated Values) file which is built into PHP >= 5.1.0. You can of course open this CSV file with Excel and still view the file in a nicer way than plain text, albeit minus pretty formatting. At least your columns would be lined up.

You might be interested in the fputcsv function.
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: