dbTalk Databases Forums  

Excel to MySQL table

comp.databases.mysql comp.databases.mysql


Discuss Excel to MySQL table in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Excel to MySQL table - 07-09-2011 , 08:27 PM






On 7/9/2011 3:14 PM, onedbguru wrote:
Quote:
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.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #12  
Old   
onedbguru
 
Posts: n/a

Default Re: Excel to MySQL table - 07-10-2011 , 01:22 PM






On Jul 9, 9:27*pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
Quote:
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
==================
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.

Reply With Quote
  #13  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Excel to MySQL table - 07-10-2011 , 04:07 PM



On 7/10/2011 2:22 PM, onedbguru wrote:
Quote:
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.



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 (AT) attglobal (DOT) net
==================

Reply With Quote
  #14  
Old   
onedbguru
 
Posts: n/a

Default Re: Excel to MySQL table - 07-11-2011 , 08:18 PM



On Jul 10, 5:07*pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
Quote:
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".

Reply With Quote
  #15  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Excel to MySQL table - 07-11-2011 , 09:23 PM



On 7/11/2011 9:18 PM, onedbguru wrote:
Quote:
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".
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 (AT) attglobal (DOT) net
==================

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.