Re: [Ilugc] import xls data into mysql

2010-12-19 Thread manoj kumar
On Mon, Dec 13, 2010 at 2:16 PM, Usha Murali  wrote:

> >Anyone  done with importing xls data into mysql ; Could you kindly share
> >the script
> >(or)
> >it would be helpfull even  if i could get the script for xls to csv
> >conversion script ...
> _
>
>
Try HeidiSQL[1] , a free front end for mysql.

[1] http://www.heidisql.com/



-- 
< A.ManojKumar >


http://getch.wordpress.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] import xls data into mysql

2010-12-13 Thread Raja Subramanian
On Dec 13, 2010 2:17 PM, "Usha Murali"  wrote:
> Anyone  done with importing xls data into mysql ;

Ensure your data cells have correct formatting applied
before you convert to csv using OpenOffice.

Eg when I exported xls sheets to csv, phone numbers
got messed up - lost leading zeroes, and lost the +
char in +91..., etc.

- Raja
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] import xls data into mysql

2010-12-13 Thread Kamalesh
On Mon, Dec 13, 2010 at 2:16 PM, Usha Murali  wrote:

> hi,
>
> Anyone  done with importing xls data into mysql ; Could you kindly share
> the script
> (or)
> it would be helpfull even  if i could get the script for xls to csv


If you have open office, open the xls file using openoffice-calc and save it
as .csv


> conversion script ...
> ___
> ILUGC Mailing List:
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
>



-- 
Regards,
Kamalesh

P No trees were killed in the sending of this message.  However a large
number of electrons were terribly inconvenienced.

*Think before you print!*
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] import xls data into mysql

2010-12-13 Thread Mohan L
On Mon, Dec 13, 2010 at 5:20 PM, Shrinivasan T wrote:

> > Anyone  done with importing xls data into mysql ; Could you kindly share
> > the script
> > (or)
> > it would be helpfull even  if i could get the script for xls to csv
> > conversion script ...
>
> Hope pyExcelerator can help you.
>
> pyExcelerator : Python exportar MySQL to Excel
>
>
 This package appears to be no longer under maintenance.An alternative to
most of the pyExcelerator functionality is offered by xlwt (
http://pypi.python.org/pypi/xlwt), which is a fork of pyExcelerator with
immediate and continuing bug fixes and enhancements, and is supported on
Python 2.3 to 2.6.

I using MySQL  :  LOAD DATA LOCAL INFILE to load tab separated text file.

Like this :
LOAD DATA LOCAL INFILE Yourfilename.txt INTO TABLE Tablename FIELDS
TERMINATED BY '\t'" LINES TERMINATED BY '\n' (filel1,filed2...);


Thanks & Rg
Mohan L
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] import xls data into mysql

2010-12-13 Thread Asokan Pichai
xlrd is a good choice for python based reading of Excel sheets

On 13 December 2010 17:19, Kenneth Gonsalves  wrote:

> On Mon, 2010-12-13 at 17:11 +0530, Raman.P wrote:
> > > for xls to csv
> > > conversion script ...
> >
> > you can try mysqlimport for loading data. First convert to csv using
> >  Openoffice. If too many files are to be converted try OO with headless
> > options or better using perl.
>
> or python ;-)
> --
> regards
> KG
> http://lawgon.livejournal.com
> Coimbatore LUG rox
> http://ilugcbe.techstud.org/
>
> ___
> ILUGC Mailing List:
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
>



-- 
Asokan Pichai
*---*
We will find a way. Or, make one. (Hannibal)
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] import xls data into mysql

2010-12-13 Thread Kenneth Gonsalves
On Mon, 2010-12-13 at 17:11 +0530, Raman.P wrote:
> > for xls to csv
> > conversion script ...
>  
> you can try mysqlimport for loading data. First convert to csv using
> Openoffice. If too many files are to be converted try OO with headless
> options or better using perl. 

or python ;-)
-- 
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] import xls data into mysql

2010-12-13 Thread Shrinivasan T
> Anyone  done with importing xls data into mysql ; Could you kindly share
> the script
> (or)
> it would be helpfull even  if i could get the script for xls to csv
> conversion script ...

Hope pyExcelerator can help you.

pyExcelerator : Python exportar MySQL to Excel

Explore these links.
http://sourceforge.net/projects/pyexcelerator/
http://tareqalam.wordpress.com/2008/05/03/python-exportar-mysql-to-excel/
http://tareqalam.wordpress.com/2008/06/20/pyexcelerator-python-exportar-excel-to-mysql/


-- 
Regards,
T.Shrinivasan


My Life with GNU/Linux : http://goinggnu.wordpress.com
Free/Open Source Jobs : http://fossjobs.in
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] import xls data into mysql

2010-12-13 Thread Raman.P
--- On Mon, 13/12/10, Usha Murali  wrote:
> 
> Anyone  done with importing xls data into mysql ;
> Could you kindly share
> the script
> (or)
> it would be helpfull even  if i could get the script
> for xls to csv
> conversion script ...
 
you can try mysqlimport for loading data. First convert to csv using 
Openoffice. If too many files are to be converted try OO with headless options 
or better using perl.

Raman.P
blog:http://ramanchennai.wordpress.com/



___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] import xls data into mysql

2010-12-13 Thread Shakthi Kannan
Hi,

--- On Mon, Dec 13, 2010 at 2:16 PM, Usha Murali  wrote:
| Anyone  done with importing xls data into mysql ; Could you kindly share
| the script
| (or)
| it would be helpfull even  if i could get the script for xls to csv
| conversion script ...
\--

You haven't mentioned the data fields in your .xls. You can write a
script with Perl (for example).

To read .csv you can use Perl Text::CSV [1] and to write to database,
use Perl DBI [2].

SK

[1] Perl Text::CSV.
http://search.cpan.org/~makamaka/Text-CSV-1.20/lib/Text/CSV.pm

[2] Perl DBI. http://dbi.perl.org/

-- 
Shakthi Kannan
http://www.shakthimaan.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] import xls data into mysql

2010-12-13 Thread Abishek Goda
Hi,
> it would be helpfull even  if i could get the script for xls to csv
> conversion script ...
Open with any tool that can handle XL and do save-as-csv. I know MS
Office does that. I am sure openoffice would.

Abishek
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


[Ilugc] import xls data into mysql

2010-12-13 Thread Usha Murali
hi,

Anyone  done with importing xls data into mysql ; Could you kindly share
the script
(or)
it would be helpfull even  if i could get the script for xls to csv
conversion script ...
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc