FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Working with Excel, PHP & MySQL. Any Ideas





martqasomo
I am running a PHP site. (WAMP/XP). From the site, authenticated users download Microsoft Excel (.xls) templates (dont ask why: too complicated)which they are required to fill and re-submit (The site handles the downloading and uploading of the spreadsheet).

Question Question?

How do I convert from Excel Spreadsheet to MySql, hence populate a MySql table with the Spreadsheet values taking the columns as Fields?

So far these have been ideas thought of, not implemented but I would really like some assistance as to how to go about implementation.

1. A script that converts Excel spreadsheets to CSV or Tab delimited Textfiles hence access to the necessary fields.
2. A script that reads in the CSV or Tab delimited Text Files Line By Line and Creates the field in Mysql database table. From there deriving the reports should be an easier task.

Question Does anyone have any suggestions or even better, scripts that can handle 1 and 2 above or suggestions as to how we can write the above scripts? Is it possible??

Thanx.

PMS if u require further details.

Marto.
Nyizsa
Converting an Excel spreadsheet to comma-delimited or any form is really simple. Have you ever tried Save As...? (Or you want this to be done fully automatized?)
Well, complicated or not... hm... WHY?
I suggest using forms or emails with strict content or whatever you can think of, but why .xls? Feel free to explain it - we have time...
bahenol
u can use software like Navicat (www.navicat.com) to export mysql table to excel and edit it ...with simple way....u must try it

god luck Laughing
martqasomo
Nice one! Laughing

I really wish using Save As.. was the solution however, the conversion is supposed to be done by the site when the script is called. The scripting idea is just one way of doing it, any other ideas as to how to accomplish it are welcome.

The reason for using .xls is that alot of information is required from the users in a simple standardized format. The end users have very slow internet connections, if any at all, and hence using forms to derive the data is cumbersome to them. excel sheets are lite and can be finely formatted. Suggestions on any other formats are welcome.

TY for the responses.

I'll check out the NAVICAT though.
kv
Check this out. Might be useful.

http://www.paggard.com/projects/xls.reader/
martqasomo
KV,

Thanx 4 the link. Prob is that these guyz charge. All the same shall check it out.

Marto.
Nyizsa
Try writing a macro which will save the sheet as a comma separated text file. Include it in your blank .xls file, associate a button to it, then tell your clients to click the button, and submit the generated file (instead of the .xls) when they are on-line. Your problem is solved, and also the size will be smaller - clients will be happy!
Related topics
E-Cards with PHP & MySQL
HTTP AUTH with PHP and mySQL
php and mysql connection in flash based website
creating guestbooks (form) with php & mysql
A very good PHP MySQL Tutorial
Flash, PHP and MySQL
PHP and MYSQL on the computer
Good PHP Books
Simple php & mysql script
PHP & MySQL auth system
Help regarding Php & MySQL
which host do u like put php&mysql?
php and mysql form
PHP-Fusion | An Open Source CMS | PHP & MySQL Based
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.