Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7105
| References | <9ad94241-e281-4325-9c0d-23547ad0b9b9@glegroupsg2000goo.googlegroups.com> <85318329-5bc8-4474-a54e-4e7ff53cd304@k3g2000prl.googlegroups.com> <0604E20B5F6F2F4784C9C8C71C5DD4DD2E348A0CA3@EMARC112VS01.exchad.jpmchase.net> |
|---|---|
| Date | 2011-06-06 11:43 -0700 |
| Subject | Re: How to import data from MySQL db into excel sheet |
| From | Benjamin Kaplan <benjamin.kaplan@case.edu> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2501.1307385843.9059.python-list@python.org> (permalink) |
On Mon, Jun 6, 2011 at 9:35 AM, Prasad, Ramit <ramit.prasad@jpmchase.com> wrote: >> Currently i am importing the Database into CSV file using csv module, >>in csv file i need to change the column width according the size of >>the data. i need to set different column width for different columns >>pleas let me know how to achieve this > > If you are using xlwt: > sheet.col(9).width = 3200 > > I am not sure exactly what unit the 3200 represents so I just adjust this manually to be a size that works for me. > > > Ramit > > xlwt is a package for editing Excel files. CSV, despite being a format that Excel can open, is not an Excel file. A CSV is to spreadsheets what plain text is to word processing. It's an extremely simple, easy to use format programaticfally but it doesn't support any formattting of any kind.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Aw: How to import data from MySQL db into excel sheet Martin Brochhaus <martin.brochhaus@googlemail.com> - 2011-06-02 05:19 -0700
Re: How to import data from MySQL db into excel sheet hisan <santosh.ssit@gmail.com> - 2011-06-02 10:25 -0700
Re: How to import data from MySQL db into excel sheet Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-06-02 11:48 -0700
Re: How to import data from MySQL db into excel sheet -- Very Urgent hisan <santosh.ssit@gmail.com> - 2011-06-03 05:22 -0700
Re: How to import data from MySQL db into excel sheet -- Very Urgent Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2011-06-03 18:11 +0530
RE: How to import data from MySQL db into excel sheet "Prasad, Ramit" <ramit.prasad@jpmchase.com> - 2011-06-06 12:35 -0400
Re: How to import data from MySQL db into excel sheet Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-06-06 11:43 -0700
RE: How to import data from MySQL db into excel sheet "Prasad, Ramit" <ramit.prasad@jpmchase.com> - 2011-06-06 16:18 -0400
csiph-web