suttercain Posted August 14, 2007 Author Share Posted August 14, 2007 Hi Guys, So here are screenshots from the excel file. The file itself has 5 worksheets that are relational to each other. Three of these worksheets contain information that I would like to have INSERTED into a MySQL database and pre-determined tables. Now this gets even more complex because I want certain columns from a worksheet to go into a certain and other columns from that same worksheet to go into another table. You can see they are color schemed to show a "section" that should go into a table. Here is how the MYSQL database is set up to accept these spreadsheets. Using foreign keys we tie them to each other. Barand, In you opinion,does it appear that XML might be the way to go? Thanks guys. I am actually having fun trying to break this down. SC Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-323861 Share on other sites More sharing options...
Barand Posted August 14, 2007 Share Posted August 14, 2007 I'd go for COM and loop through the worksheets/rows/columns. Store extracted data in arrays for each mysql table then write the data away. What the hell, $10K MSExcel -> XML is like saving a Word doc as HTML - too much information Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-323881 Share on other sites More sharing options...
suttercain Posted August 15, 2007 Author Share Posted August 15, 2007 HI Barrand, Thanks for the reply. I have been looking all over google.com and hotscripts.com and pear.php.net and have had no luck. Is anyone aware of a PHP script that can take an Excel file (.xls) and upload it into MySQL? I am thinking if I can see the structure I can maybe manipulate it to my specific needs. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-324787 Share on other sites More sharing options...
roopurt18 Posted August 15, 2007 Share Posted August 15, 2007 Given a couple of conditions I'll do this for you by Monday for $1k USD. 1) Provide me with a sample spreadsheet and .sql file to rebuild the relevant tables in your database no later than 4PM Friday. 2) Your host is linux-based (I <i>might</i> be able to pull it off on a windows host) 3) I maintain the right to resell / reuse the code (you can also do the same) (Sorry Barand) Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-324825 Share on other sites More sharing options...
suttercain Posted August 15, 2007 Author Share Posted August 15, 2007 This is the closest script I could find and runs for $130.0, I'm not sure if it takes the information and stores it into a database though: http://www.eephp.com/ Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-324842 Share on other sites More sharing options...
roopurt18 Posted August 15, 2007 Share Posted August 15, 2007 It looks like its just an API to parse the files. My guess is it's like using COM to open a sheet and grab content out of a certain cell; note that it requires PHP5. Once you figure out how the API works, I'm sure you could create a driver function that just takes a mapping array and the .xls file to use. This function would open the file and use the mapping array to dump the contents into a MySQL table. I use a similar mechanism for importing dbase files into MySQL. Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-324860 Share on other sites More sharing options...
dbo Posted August 15, 2007 Share Posted August 15, 2007 I'd take roopurt up on his offer if I were you. Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-324878 Share on other sites More sharing options...
roopurt18 Posted August 15, 2007 Share Posted August 15, 2007 Given a couple of conditions I'll do this for you by Monday for $1k USD. 1) Provide me with a sample spreadsheet and .sql file to rebuild the relevant tables in your database no later than 4PM Friday. 2) Your host is linux-based (I might be able to pull it off on a windows host) 3) I maintain the right to resell / reuse the code (you can also do the same) Additionally, I'd need to know if your hosting is shared or not and possibly what versions of Excel you're looking to support. Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-324906 Share on other sites More sharing options...
suttercain Posted August 15, 2007 Author Share Posted August 15, 2007 If you can actually do this, my supervisor is saying we can do $1000.00. The host is not shared. We actually have our own servers. I have sent you an IM with my work phone number. Call me when you can so I can make sure we understand the requirements. SC Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-325005 Share on other sites More sharing options...
Barand Posted August 15, 2007 Share Posted August 15, 2007 Just curious (as I'm in the middle of a project right now and don't have the time for the next couple of weeks, and my quotes were tongue-in-cheek) but would your super have sanctioned the $10K before Roopert jumped in so bloody cheaply? Better PM me, don't want to p*ss him off if the anwer is "Yes" Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-325028 Share on other sites More sharing options...
suttercain Posted August 15, 2007 Author Share Posted August 15, 2007 Barand, You have no idea how hard it is to get a dollar from the agency I work for. $10,000 would not have been possible Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-325046 Share on other sites More sharing options...
Barand Posted August 15, 2007 Share Posted August 15, 2007 If I were to put in a serious quote it wouldn't have been anything like that amount anyway. They must have a hell of lot of overheads to come up with $30K. Maybe they're a subsidiary of Microshaft. Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-325085 Share on other sites More sharing options...
roopurt18 Posted August 15, 2007 Share Posted August 15, 2007 Wouldn't Macroshaft be more appropriate? Quote Link to comment https://forums.phpfreaks.com/topic/64713-does-anyone-know-if-this-excel-to-mysql-can-actually-be-performed/page/2/#findComment-325097 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.