Excel to MySQL table

  • Follow


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
0
Reply joeh8556 (19) 7/7/2011 7:42:25 PM

On Thu, 07 Jul 2011 14:42:25 -0500, 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 fourth step there could probably be effectively managed with a C/C++
program. The others are already pretty well-optimized within the range
of what's determinable at compile-time or without much human input.

-- 
71. If I decide to test a lieutenant's loyalty and see if he/she should
    be made a trusted lieutenant, I will have a crack squad of marksmen
    standing by in case the answer is no.
	--Peter Anspach's list of things to do as an Evil Overlord
0
Reply hellsop (936) 7/7/2011 8:12:22 PM


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


0
Reply Erik.Lennart.Jonsson (181) 7/7/2011 10:08:33 PM

On Jul 7, 6:08=A0pm, Lennart Jonsson <erik.lennart.jons...@gmail.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.
0
Reply onedbguru (192) 7/7/2011 11:48:41 PM

On 2011-07-08 01:48, onedbguru wrote:
> On Jul 7, 6:08 pm, Lennart Jonsson <erik.lennart.jons...@gmail.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.

and the conversion from BIFFx (or whatever it is called these days) to csv?


/Lennart
0
Reply Erik.Lennart.Jonsson (181) 7/8/2011 5:54:08 AM

Le Thu, 07 Jul 2011 14:42:25 -0500, Joseph Hesse a écrit :

> 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

Yould try an ODBC link between Mysql and your excel sheet
André
0
Reply pas5607 (16) 7/8/2011 12:33:37 PM

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
0
Reply tnp (2247) 7/8/2011 12:50:24 PM

On Jul 8, 8:50=A0am, The Natural Philosopher <t...@invalid.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-xls-files-csv-xls2csv-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.
0
Reply onedbguru (192) 7/8/2011 9:18:45 PM

On Fri, 8 Jul 2011 14:18:45 -0700 (PDT), onedbguru wrote:
> On Jul 8, 8:50?am, The Natural Philosopher <t...@invalid.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-xls-files-csv-xls2csv-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
0
Reply hellsop (936) 7/9/2011 6:53:57 PM

On Jul 9, 2:53=A0pm, "Peter H. Coffin" <hell...@ninehells.com> wrote:
> On Fri, 8 Jul 2011 14:18:45 -0700 (PDT), onedbguru wrote:
> > On Jul 8, 8:50?am, The Natural Philosopher <t...@invalid.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-xls-files-csv-xls2csv-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,
> =A0 =A0there is probably someone just as attractive who is not desperate =
to
> =A0 =A0kill me. Therefore, I will think twice before ordering a prisoner
> =A0 =A0sent 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.
0
Reply onedbguru (192) 7/9/2011 7:14:55 PM

On 7/9/2011 3:14 PM, onedbguru wrote:
> On Jul 9, 2:53 pm, "Peter H. Coffin"<hell...@ninehells.com>  wrote:
>> On Fri, 8 Jul 2011 14:18:45 -0700 (PDT), onedbguru wrote:
>>> On Jul 8, 8:50?am, The Natural Philosopher<t...@invalid.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-xls-files-csv-xls2csv-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.
jstucklex@attglobal.net
==================
0
Reply jstucklex (14341) 7/10/2011 1:27:02 AM

On Jul 9, 9:27=A0pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 7/9/2011 3:14 PM, onedbguru wrote:
>
>
>
>
>
>
>
>
>
> > On Jul 9, 2:53 pm, "Peter H. Coffin"<hell...@ninehells.com> =A0wrote:
> >> On Fri, 8 Jul 2011 14:18:45 -0700 (PDT), onedbguru wrote:
> >>> On Jul 8, 8:50?am, The Natural Philosopher<t...@invalid.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-xls-files-csv-xls2csv-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,
> >> =A0 =A0 there is probably someone just as attractive who is not desper=
ate to
> >> =A0 =A0 kill me. Therefore, I will think twice before ordering a priso=
ner
> >> =A0 =A0 sent to my bedchamber. --Peter Anspach's Evil Overlord list
>
> > Since it doesn't require c/c++ - yes. =A0 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++. =A0If so, you have made
> it much more difficult for him.
>
> --
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

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 =AB testxls.xls =BB -c =AB 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=3D317846 where there are
not one, but two xls2csv in both c and c++ programs.



0
Reply onedbguru (192) 7/10/2011 6:22:29 PM

On 7/10/2011 2:22 PM, onedbguru wrote:
> On Jul 9, 9:27 pm, Jerry Stuckle<jstuck...@attglobal.net>  wrote:
>> On 7/9/2011 3:14 PM, onedbguru wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> On Jul 9, 2:53 pm, "Peter H. Coffin"<hell...@ninehells.com>    wrote:
>>>> On Fri, 8 Jul 2011 14:18:45 -0700 (PDT), onedbguru wrote:
>>>>> On Jul 8, 8:50?am, The Natural Philosopher<t...@invalid.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-xls-files-csv-xls2csv-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...@attglobal.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.
>
>
>

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.
jstucklex@attglobal.net
==================
0
Reply jstucklex (14341) 7/10/2011 9:07:45 PM

On Jul 10, 5:07=A0pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 7/10/2011 2:22 PM, onedbguru wrote:
>
>
>
>
>
>
>
>
>
> > On Jul 9, 9:27 pm, Jerry Stuckle<jstuck...@attglobal.net> =A0wrote:
> >> On 7/9/2011 3:14 PM, onedbguru wrote:
>
> >>> On Jul 9, 2:53 pm, "Peter H. Coffin"<hell...@ninehells.com> =A0 =A0wr=
ote:
> >>>> On Fri, 8 Jul 2011 14:18:45 -0700 (PDT), onedbguru wrote:
> >>>>> On Jul 8, 8:50?am, The Natural Philosopher<t...@invalid.invalid>
> >>>>> wrote:
> >>>>>> Joseph Hesse wrote:
> >>>>>>> I currently convert an excel file to a mysql table in the followi=
ng 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 o=
f
> >>>>>>> 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-xls-files-csv-xls2csv-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 sele=
ct
> >>>>> 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,
> >>>> =A0 =A0 =A0there is probably someone just as attractive who is not d=
esperate to
> >>>> =A0 =A0 =A0kill me. Therefore, I will think twice before ordering a =
prisoner
> >>>> =A0 =A0 =A0sent to my bedchamber. --Peter Anspach's Evil Overlord li=
st
>
> >>> Since it doesn't require c/c++ - yes. =A0 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++. =A0If so, you have m=
ade
> >> it much more difficult for him.
>
> >> --
> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> > 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 =AB testxls.xls =BB -c =AB 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=3D317846where 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. =A0And 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. =A0And your
> "solution" doesn't meet his requirements.
>
> --
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


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".
0
Reply onedbguru (192) 7/12/2011 1:18:11 AM

On 7/11/2011 9:18 PM, onedbguru wrote:
> On Jul 10, 5:07 pm, Jerry Stuckle<jstuck...@attglobal.net>  wrote:
>> On 7/10/2011 2:22 PM, onedbguru wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> On Jul 9, 9:27 pm, Jerry Stuckle<jstuck...@attglobal.net>    wrote:
>>>> On 7/9/2011 3:14 PM, onedbguru wrote:
>>
>>>>> On Jul 9, 2:53 pm, "Peter H. Coffin"<hell...@ninehells.com>      wrote:
>>>>>> On Fri, 8 Jul 2011 14:18:45 -0700 (PDT), onedbguru wrote:
>>>>>>> On Jul 8, 8:50?am, The Natural Philosopher<t...@invalid.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-xls-files-csv-xls2csv-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...@attglobal.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=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...@attglobal.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".

He didn't ask you to provide a working solution.  He asked for pointers 
to a C/C++ solution.  You supplied him with a Perl solution.

No, I didn't post any pointers because others beat me to it with a 
*correct* response.  No sense duplicating what was already said.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
Reply jstucklex (14341) 7/12/2011 2:23:14 AM

14 Replies
39 Views

(page loaded in 0.188 seconds)

Similiar Articles:


















7/24/2012 1:32:04 PM


Reply: