Jump to content

Does anyone know if this Excel to MySQL can actually be performed?


Recommended Posts

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.

 

excel1.gif

excel2.gif

excel3.gif

 

Here is how the MYSQL database is set up to accept these spreadsheets. Using foreign keys we tie them to each other.

 

mysql.gif

 

 

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

 

 

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 :D

 

MSExcel -> XML is like saving a Word doc as HTML - too much information

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

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)

 

:D

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.

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.

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

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"  :D

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.