0

I am using microsoft visual studio 10 c++ and mysql workbench.I have a large number of excel files and i want to update the content of all excel files into a single mysql table.I can create a csv file for each excel file and then import it but i want it to be done with the help of a stored procedure.I want to use c++.And this procedure has to be repeated with different excel files.

i was thinking of connecting my c++ program to both excel and mysql simultaneously(is it possible?) and reading the excel files and adding the data into the mysql table. i have already connected my program to mysql database. Any other approach would be appreciated.

user3819404
  • 611
  • 6
  • 18
  • Why do you need any C++ or stored procedure at all? MySQL can already load CSV files. All you have to do is produce them in the appropriate format. – user207421 Jul 10 '14 at 10:33
  • but for that i have to manually create csv's for each excel file and then load it into mysql. – user3819404 Jul 10 '14 at 10:36
  • Just write a script that will do it for you :) http://stackoverflow.com/questions/1858195/convert-xls-to-csv-on-command-line – hurufu Jul 10 '14 at 11:29
  • This is not so easy and there many technical pitfalls in the extraction of the data from excel, especially with mixed field types. I have written a program that also include commandline options to do this, but I am biased and believe it is the best solution. Let me know if you are interested, otherwise consider csv which will still take a bit of extra time. – panofish Jul 18 '14 at 04:02

1 Answers1

0

In MySQL Store Procedure it will not accept bulk load or CSV import But You can use without SP. Better Try to import using C++.

Benny
  • 432
  • 1
  • 6
  • 21