Save Form Data to XLS (Excel)
Hi Guys, this is my first ever post here, and hopefully, not my last.
I am in Desperate need of some expert knowledge:
Here is what I have:
Online: HTML Page with form (Without any Properties)
Offline: Excel (XLS) Spreadsheet, with the following fields:
First Name , Last Name , Email Address
Here is what I need to do:
I want to get the HTML form to save submitted data directly to the xls file (which is offline), without any email activity.
I was thinking some kind of central database online, which would collect the data from the HTML Form, then uopn request, download directly into the xls.
Anyways, I will see what you make of this. Call me a brainless git if you want, but with all due respect, if everyone knew everything, then why are these forums here?
Naturally, I could do all this Manually, but then, where is the beauty of programming?
Thank you so much in advance, you will never know how much this will help my website. I am fed up of doing everything manually.
if you feel the need, please email me directly:
zdrastvuitye [at] hotmail.co.uk
All the best news here: https://newsbotnet.com
webwiz posted this at 04:51 — 10th October 2007.
He has: 629 posts
Joined: May 2007
Well, I know nowt about the format of XLS files. But I do know that Excel accepts CSV files. That's Comma Separated Values.
It is relatively easy to parse the values from each of the form fields into a CSV file. You could the store it for later download, as you suggest, or even use sendmail on the server to send it to your email client for direct entry into Excel. Should be easy using any server-side scripting language. Check the Import feature of Excel to see how to import CSV.
The CSV file simply uses commas between each value, with one possible modification: if the value itself contains a comma, the value is wrapped in double quotes ("). Further, if there is already a double quote inside this new value, that double quote is doubled:
Example:
value 1: Jane
value 2: Doe
value 3: "Jane Doe"
Output: Jane,Doe,"""Jane Doe"" "
I hope this is not double Dutch!
Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;
DarkLight posted this at 12:17 — 10th October 2007.
He has: 287 posts
Joined: Oct 2007
Hey, thanks. Not exactly what i had in mind, but its a pretty good soution. You helped me out a lot here.
To anyone else, if you have any other info, excluding email transfer, plz post.
All the best news here: https://newsbotnet.com
JeevesBond posted this at 20:59 — 10th October 2007.
He has: 3,956 posts
Joined: Jun 2002
Problem with xls is that it's a proprietary format, no-one but Microsoft really know the format. CSV on the other hand is dead simple: it's just a bunch of values, seperated by commas, and if you're running a computer with Office installed it'll open in Excel by default. The other beauty is that if you, or any of your customers, ever use an alternate office suite you (and your customers) will definitely be able to open the files. Trust me, it makes sense.
Next question is: what does your hosting company provide, in particular, are PHP and MySQL available? You need to get the values from the form and put them into a database. Next, you need to create another page (probably in a password protected directory) that creates a CSV file from the values stored in the database. This is a great little project to get you into programming (am assuming you're quite new to it).
Quite right.
What we can't do around here is do all the work for you, or even tell you exactly how to do it. It would unfortunately take hours and we'd probably not even come up with exactly what you want anyway. We can tell you what you need to learn though:
This should get you started, sound ok? Let us know what your hosting company supports and I might be able to provide some good resources for you. If you have any questions along the way, make them as specific as possible, we'll be able to answer you better.
a Padded Cell our articles site!
DarkLight posted this at 09:36 — 11th October 2007.
He has: 287 posts
Joined: Oct 2007
Ahh, this is great! This is what I wanted to know. Of course!!! the CSV, why did i not think of that! Thank you to everyone who has helped. I am not that new to programming, but i use things like c++ and older formats. Thanks again for all your help. I will follow these tips, and hopefully, be a couple of steps closer.
Please take a look at my website, tell me what you think...:
http://www.pcgenius.co.nr/
All the best news here: https://newsbotnet.com
JeevesBond posted this at 13:58 — 11th October 2007.
He has: 3,956 posts
Joined: Jun 2002
Cool. Glad to be of help. If you get stuck on any particular point you know where to find us.
DarkLight posted this at 17:49 — 19th April 2010.
He has: 287 posts
Joined: Oct 2007
My God I was a noob back then LOL
ThyCab posted this at 06:44 — 19th September 2010.
They have: 3 posts
Joined: Sep 2010
Sorry for bumping this guys but i seem to have the same problem with DarkLight.
Ill start by introducing what i need.
What i can do:
A HTML website coded with CSS and HTML form.
What i cannot do:
This is abit hard to explain so ill write from 2 viewpoint
-----------------------------------------------------------------------------------------------------------------------------
The Client: Visited this website, OH a form to register a flea booth!, [registration in progress], Submit! Done...
The Server: Receive the registration, automatically turns it into an excel file and save it on the server.
Client 2: Visited this website, OH a form to register a flea booth!, [registration in progress], Submit! Done...
The Server: Receive the registration, update it to the 2nd row of the previous excel file and save it.
-----------------------------------------------------------------------------------------------------------------------------
So guys, what do i need to know or learn in order to do this? And DarkLight, i'm glad that you finally found your way out and thinking you was a noob back then! Hopefully ill be able to be like you in few years time.
whawha60 posted this at 11:54 — 16th January 2013.
They have: 1 posts
Joined: Jan 2013
Hi Everyone
I am totally self taught and have just joined this post and need a solution to the same problem. I have a PHP form with text boxes and some drop down boxes. Ideally, I want the data to post to an Excel database. I sort of understand GET and POST, but I don't know enough to develop a MySQL database for the data and without precise instructions can't set up a comma separated code. Eg, where do you write that code? On a separate html page or on php page? How does the php form and the CS code connect?
Would appreciate some assistance, guidance or where best to learn.
Greg K posted this at 15:26 — 16th January 2013.
He has: 2,145 posts
Joined: Nov 2003
Please copy your post over to a new topic, many people (myself included) normally do not open threads that are 5 years old unless they are actively discussing the thread.
This thread is now closed due to age.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.