943,723 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2204
  • PHP RSS
Jul 24th, 2009
0

Form to Excel

Expand Post »
Hello Guys,

I would like to know if its possible to have a form with four felds which when i press submit it stores the details to database and then excel or directly to excel, iv been searching around, and couldnt find much information, so would apericiate so help. Or if someone could give me a link to a tutorial.

Thank you
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
NoID is offline Offline
49 posts
since Jul 2009
Jul 24th, 2009
-1

Re: Form to Excel

somebody on daniweb recently did a thing with php/excel with COM. I think you need to be running IIS, but I may be wrong. Search the last 4 days for posts on this.
Sponsor
Featured Poster
Reputation Points: 1048
Solved Threads: 946
Sarcastic Poster
ardav is offline Offline
6,678 posts
since Oct 2006
Jul 24th, 2009
0

Re: Form to Excel

if only the data is important, the structure of the file constant,
mysql/php export the data as csv which excel can import and read as data
without fussing with .xls format
if the structure of the file is important, for calculated fields, a 'blank' .xls for download and then import the same comma separated values into it

If you need a lockdown .xls file try http://www.phpclasses.org/browse/package/3995.html
Reputation Points: 562
Solved Threads: 368
Posting Maven
almostbob is offline Offline
2,970 posts
since Jan 2009
Jul 24th, 2009
0

Re: Form to Excel

Thank you guys for the help so far, i have been able to click on export and then "Microst Excel 2000" which has done what i want, but when i try to mail merge it just gives me an error, can someone please help, please note that i have found a tutorial but its not exactly what i want to thank you so far.
Reputation Points: 10
Solved Threads: 0
Light Poster
NoID is offline Offline
49 posts
since Jul 2009
Jul 24th, 2009
0

Re: Form to Excel

http://www.dreamincode.net/forums/showtopic10132.htm
This tutorial is easy to follow and will teach you how to write a tab delimited text file with a xls extension in php. It uses basic php text file functions such as fopen and fwrite.
Reputation Points: 232
Solved Threads: 137
Practically a Master Poster
buddylee17 is offline Offline
665 posts
since Nov 2007
Jul 24th, 2009
0

Re: Form to Excel

I think that you can use my little desktop_write routine to produce your excel file.

http://innovationsdesign.net/wb_2.7/.../downloads.php
Reputation Points: 210
Solved Threads: 228
Nearly a Posting Virtuoso
chrishea is offline Offline
1,389 posts
since Sep 2008
Jul 24th, 2009
0

Re: Form to Excel

Are you wanting to do it via a website or inside excel itself?
I know that if you press some alt and function key or somethign, you can insert vb6 code inside excel. This also includes created forms. If done correctly you can load the form and it inserts the code inside the table.-- how its done, i couldnt' tell you
Reputation Points: 10
Solved Threads: 0
Light Poster
ctyokley is offline Offline
35 posts
since Jul 2009
Jul 25th, 2009
0

Re: Form to Excel

Hello Guys.

Thank you for replying back, what i need is 3 fields which are

Name
Age
Location

And when i fill this in, it stores the data to mysql database, which i know how to do,


But then i want to go to convertphptoexcel.php which then converts all the feilds and information to excel so i can download the file and open it so i can do mailmerge.
Reputation Points: 10
Solved Threads: 0
Light Poster
NoID is offline Offline
49 posts
since Jul 2009
Jul 25th, 2009
0

Re: Form to Excel

Click to Expand / Collapse  Quote originally posted by NoID ...
Hello Guys.

Thank you for replying back, what i need is 3 fields which are

Name
Age
Location

And when i fill this in, it stores the data to mysql database, which i know how to do,


But then i want to go to convertphptoexcel.php which then converts all the feilds and information to excel so i can download the file and open it so i can do mailmerge.
If its just for mail merge
output the query that gets the information as comma separated
php Syntax (Toggle Plain Text)
  1. /* select query for each selected row define file open file for writing*/ {
  2. fput ($file,'/"'.$Name.'/",/"'.$Age'/",/"'.$Location'/"');
  3. }
  4. /* fclose rest of query set file for download*/
every mail merge can handle csv, an excel spreadsheet is unneccessary for the task,
like swatting a fly with an a-bomb

edit. do those "/" point the right way?
Last edited by almostbob; Jul 25th, 2009 at 6:52 am.
Reputation Points: 562
Solved Threads: 368
Posting Maven
almostbob is offline Offline
2,970 posts
since Jan 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: problem with upload script
Next Thread in PHP Forum Timeline: Starting with PHP





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC