Excel macro to MySql code
I had an idea for a little Excel macro today. I needed to take a set of data from an excel sheet and insert into a MySQL database. It would be great to have an excel add-in that could take the highlighted cells as input and generate an insert statement for each row, and of course doing a little magic of just quoting non-numerics.
- Select cells
- Hit add-in
- Enter table name
Done.
You can start with this code. Check out the one comment – it sounds like a pretty good idea that could still be automated.
Errrr – here’s the link
http://www.dailydoseofexcel.com/archives/2005/12/02/create-insert-into-sql-statements/