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

Recommended Answers

All 8 Replies

Member Avatar for diafol

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.

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

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.

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

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.

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

/* select query for each selected row define file open file for writing*/ {
fput ($file,'/"'.$Name.'/",/"'.$Age'/",/"'.$Location'/"');
}
/* 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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.