![]() | |
#11
| |||
| |||
|
|
On Jul 9, 2:53 pm, "Peter H. Coffin"<hell... (AT) ninehells (DOT) com> wrote: 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 Since it doesn't require c/c++ - yes. Again, don't make it more difficult than needed - and programming the thing in c/c++ would be overkill. |
#12
| |||
| |||
|
|
On 7/9/2011 3:14 PM, onedbguru wrote: On Jul 9, 2:53 pm, "Peter H. Coffin"<hell... (AT) ninehells (DOT) com> *wrote: 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 followingway. 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 Since it doesn't require c/c++ - yes. * Again, don't make it more difficult than needed - and programming the thing in c/c++ would be overkill. Not if one doesn't know perl but does know c/c++. *If so, you have made it much more difficult for him. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== |
That being said, a simple search will get you:
#13
| |||
| |||
|
|
On Jul 9, 9:27 pm, Jerry Stuckle<jstuck... (AT) attglobal (DOT) net> wrote: On 7/9/2011 3:14 PM, onedbguru wrote: On Jul 9, 2:53 pm, "Peter H. Coffin"<hell... (AT) ninehells (DOT) com> wrote: 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 Since it doesn't require c/c++ - yes. Again, don't make it more difficult than needed - and programming the thing in c/c++ would be overkill. Not if one doesn't know perl but does know c/c++. If so, you have made it much more difficult for him. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== Not sure why it is so difficult to allow the OP to make mistakes and do a little research on their own. Also, just because it uses perl does not necessitate the need to know perl. Given the instructions on how to use the referenced program, one would simply execute: xls2csv -x « testxls.xls » -c « testcsv.xls Doesn't seem that hard to me and I didn't need to know perl to execute it.. That being said, a simple search will get you:http://www.codeguru.com/forum/showthread.php?t=317846 where there are not one, but two xls2csv in both c and c++ programs. |
#14
| |||
| |||
|
|
On 7/10/2011 2:22 PM, onedbguru wrote: On Jul 9, 9:27 pm, Jerry Stuckle<jstuck... (AT) attglobal (DOT) net> *wrote: On 7/9/2011 3:14 PM, onedbguru wrote: On Jul 9, 2:53 pm, "Peter H. Coffin"<hell... (AT) ninehells (DOT) com> * *wrote: 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 Since it doesn't require c/c++ - yes. * Again, don't make it more difficult than needed - and programming the thing in c/c++ would be overkill. Not if one doesn't know perl but does know c/c++. *If so, you have made it much more difficult for him. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== Not sure why it is so difficult to allow the OP to make mistakes and do a little research on their own. Also, just because it uses perl does not necessitate the need to know perl. Given the instructions on how to use the referenced program, one would simply execute: xls2csv -x « testxls.xls » -c « testcsv.xls Doesn't seem that hard to me and I didn't need to know perl to execute it.. That being said, a simple search will get you:http://www.codeguru.com/forum/showth...?t=317846where there are not one, but two xls2csv in both c and c++ programs. And require him to search out and install perl (a lot of places don't have it) as well as other packages. *And it does require him to understand perl, for when it doesn't work as he expected or he needs to modify it for other purposes. The bottom line is - whether you agree with his requirements or not, they are HIS requirements, and they are very reasonable. *And your "solution" doesn't meet his requirements. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== |
#15
| |||
| |||
|
|
On Jul 10, 5:07 pm, Jerry Stuckle<jstuck... (AT) attglobal (DOT) net> wrote: On 7/10/2011 2:22 PM, onedbguru wrote: On Jul 9, 9:27 pm, Jerry Stuckle<jstuck... (AT) attglobal (DOT) net> wrote: On 7/9/2011 3:14 PM, onedbguru wrote: On Jul 9, 2:53 pm, "Peter H. Coffin"<hell... (AT) ninehells (DOT) com> wrote: 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 Since it doesn't require c/c++ - yes. Again, don't make it more difficult than needed - and programming the thing in c/c++ would be overkill. Not if one doesn't know perl but does know c/c++. If so, you have made it much more difficult for him. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== Not sure why it is so difficult to allow the OP to make mistakes and do a little research on their own. Also, just because it uses perl does not necessitate the need to know perl. Given the instructions on how to use the referenced program, one would simply execute: xls2csv -x « testxls.xls » -c « testcsv.xls Doesn't seem that hard to me and I didn't need to know perl to execute it.. That being said, a simple search will get you:http://www.codeguru.com/forum/showth...?t=317846where there are not one, but two xls2csv in both c and c++ programs. And require him to search out and install perl (a lot of places don't have it) as well as other packages. And it does require him to understand perl, for when it doesn't work as he expected or he needs to modify it for other purposes. The bottom line is - whether you agree with his requirements or not, they are HIS requirements, and they are very reasonable. And your "solution" doesn't meet his requirements. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== Not sure when it became my job to care or provide him with *exactly* what he needed (although there were c/c++ pointers provided by ME - all of which he could have search and found himself). If he wants to pay my rates, I will provide him with a working solution. My guess is the information that was provided was sufficient. Just a side note, I didn't see you providing him with any useful information on the "requirement". |
![]() |
| Thread Tools | |
| Display Modes | |
| |