![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I currently convert an excel file to a mysql table in the following way. Open excel and delete not needed columns. Select date columns and format them to YYYY-MM-DD. Export to a csv file. Edit the csv file to remove the first line. Load the csv file to a mysql table. I would appreciate it if someone can point me to ways that some of the previous steps could be done by a C/C++ program. |
#3
| |||
| |||
|
|
I currently convert an excel file to a mysql table in the following way. Open excel and delete not needed columns. Select date columns and format them to YYYY-MM-DD. Export to a csv file. Edit the csv file to remove the first line. Load the csv file to a mysql table. I would appreciate it if someone can point me to ways that some of the previous steps could be done by a C/C++ program. |
#4
| |||
| |||
|
|
On 2011-07-07 21:42, Joseph Hesse wrote: I currently convert an excel file to a mysql table in the following way.. Open excel and delete not needed columns. Select date columns and format them to YYYY-MM-DD. Export to a csv file. Edit the csv file to remove the first line. Load the csv file to a mysql table. I would appreciate it if someone can point me to ways that some of the previous steps could be done by a C/C++ program. In Java and Python there are libraries that can be used to manipulate excel files. There probably exists something similar for c++ as well (havent tried one though). I googled for excel c++ and found for example: http://xlw.sourceforge.net/ If you find a library that works you probably can automate all steps in the process. /Lennart |
#5
| |||
| |||
|
|
On Jul 7, 6:08 pm, Lennart Jonsson <erik.lennart.jons... (AT) gmail (DOT) com wrote: On 2011-07-07 21:42, Joseph Hesse wrote: I currently convert an excel file to a mysql table in the following way. Open excel and delete not needed columns. Select date columns and format them to YYYY-MM-DD. Export to a csv file. Edit the csv file to remove the first line. Load the csv file to a mysql table. I would appreciate it if someone can point me to ways that some of the previous steps could be done by a C/C++ program. In Java and Python there are libraries that can be used to manipulate excel files. There probably exists something similar for c++ as well (havent tried one though). I googled for excel c++ and found for example: http://xlw.sourceforge.net/ If you find a library that works you probably can automate all steps in the process. /Lennart load file ignore 1 lines into a tmp table, (see docs for the "ignore" syntax. insert into realtable select a,b,d,e from tmptable; drop tmptable. Don't make it more difficult than needed. |
#6
| |||
| |||
|
|
I currently convert an excel file to a mysql table in the following way. Open excel and delete not needed columns. Select date columns and format them to YYYY-MM-DD. Export to a csv file. Edit the csv file to remove the first line. Load the csv file to a mysql table. I would appreciate it if someone can point me to ways that some of the previous steps could be done by a C/C++ program. I apologize if this is not the right forum for this question. Thank you, Joe |
#7
| |||
| |||
|
|
I currently convert an excel file to a mysql table in the following way. Open excel and delete not needed columns. Select date columns and format them to YYYY-MM-DD. Export to a csv file. Edit the csv file to remove the first line. Load the csv file to a mysql table. I would appreciate it if someone can point me to ways that some of the previous steps could be done by a C/C++ program. |
|
I apologize if this is not the right forum for this question. Thank you, Joe |
#8
| |||
| |||
|
|
Joseph Hesse wrote: I currently convert an excel file to a mysql table in the following way.. Open excel and delete not needed columns. Select date columns and format them to YYYY-MM-DD. Export to a csv file. Edit the csv file to remove the first line. Load the csv file to a mysql table. I would appreciate it if someone can point me to ways that some of the previous steps could be done by a C/C++ program. The last to are amenable to automation with a program. And the second, But not the first and third I apologize if this is not the right forum for this question. Thank you, Joe |
#9
| |||
| |||
|
|
On Jul 8, 8:50?am, The Natural Philosopher <t... (AT) invalid (DOT) invalid wrote: Joseph Hesse wrote: I currently convert an excel file to a mysql table in the following way. Open excel and delete not needed columns. Select date columns and format them to YYYY-MM-DD. Export to a csv file. Edit the csv file to remove the first line. Load the csv file to a mysql table. I would appreciate it if someone can point me to ways that some of the previous steps could be done by a C/C++ program. The last to are amenable to automation with a program. And the second, But not the first and third I apologize if this is not the right forum for this question. Thank you, Joe It is ALL doable, if you have the right tools... found this: http://capmarketer.com/converting-xl...ls2csv-ubuntu/ While it says ubuntu, it should work with any Linux distro. the do something like: perl xlstocsv ifile ofile mysql load file ignore 1 lines into a tmp table, (see docs for the "ignore" syntax. let the mysql handle the date coversion insert into real-table select a,b,d,e from tmptable; (notice I skipped one column) drop tmptable. Again, don't make it more difficult than needed. |
#10
| |||
| |||
|
|
On Fri, 8 Jul 2011 14:18:45 -0700 (PDT), onedbguru wrote: On Jul 8, 8:50?am, The Natural Philosopher <t... (AT) invalid (DOT) invalid wrote: Joseph Hesse wrote: I currently convert an excel file to a mysql table in the following way. Open excel and delete not needed columns. Select date columns and format them to YYYY-MM-DD. Export to a csv file. Edit the csv file to remove the first line. Load the csv file to a mysql table. I would appreciate it if someone can point me to ways that some of the previous steps could be done by a C/C++ program. The last to are amenable to automation with a program. And the second, But not the first and third I apologize if this is not the right forum for this question. Thank you, Joe It is ALL doable, if you have the right tools... found this: http://capmarketer.com/converting-xl...ls2csv-ubuntu/ While it says ubuntu, it should work with any Linux distro. the do something like: perl xlstocsv ifile ofile mysql load file ignore 1 lines into a tmp table, (see docs for the "ignore" syntax. let the mysql handle the date coversion insert into real-table select a,b,d,e from tmptable; (notice I skipped one column) drop tmptable. Again, don't make it more difficult than needed. You are ignoring the "using C/C++" part, aren't you? -- 26. No matter how attractive certain members of the rebellion are, * *there is probably someone just as attractive who is not desperate to * *kill me. Therefore, I will think twice before ordering a prisoner * *sent to my bedchamber. --Peter Anspach's Evil Overlord list |
![]() |
| Thread Tools | |
| Display Modes | |
| |