Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'processing.': 0.03; 'completeness': 0.05; 'width': 0.07; 'csv': 0.09; 'files.': 0.10; 'syntax': 0.11; '>>>': 0.12; '712': 0.16; '>of': 0.16; '>to': 0.16; '>what': 0.16; 'affiliates,': 0.16; 'columns': 0.16; 'csv,': 0.16; 'currencies': 0.16; 'opened,': 0.16; 'received:155.180': 0.16; 'received:155.180.234': 0.16; 'received:159.53': 0.16; 'received:159.53.110': 0.16; 'received:169.70': 0.16; 'received:172.18.0': 0.16; 'received:172.18.0.232': 0.16; 'received:bankone.net': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:svr.bankone.net': 0.16; 'solicitation': 0.16; 'subject:import': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'importing': 0.19; 'header:In-Reply-To:1': 0.21; 'column': 0.22; 'assume': 0.23; 'applicable,': 0.23; 'herein': 0.23; 'module,': 0.23; "doesn't": 0.25; 'received:169': 0.25; 'received:169.254': 0.25; 'subject:data': 0.26; 'says': 0.27; 'reflect': 0.28; 'subject:How': 0.30; 'chase': 0.30; 'received:155': 0.30; 'received:159': 0.30; 'received:169.254.1': 0.30; 'it.': 0.31; 'header:Received:8': 0.32; '(including': 0.32; 'file.': 0.32; 'to:addr:python-list': 0.33; 'topic': 0.33; 'file': 0.34; 'thank': 0.35; 'received:172.18': 0.35; 'using': 0.35; 'phone:': 0.36; 'format.': 0.36; 'accepted': 0.36; 'charset:us- ascii': 0.36; 'open': 0.36; 'data.': 0.37; 'change': 0.37; 'accuracy': 0.37; 'arising': 0.37; 'assuming': 0.37; 'despite': 0.37; 'extremely': 0.37; 'subject:from': 0.38; 'but': 0.38; 'data': 0.38; 'purposes': 0.38; 'subject:: ': 0.38; 'comments': 0.39; 'legally': 0.39; 'to:addr:python.org': 0.39; 'under': 0.40; 'plain': 0.40; 'format': 0.40; 'within': 0.60; 'you.': 0.62; 'subject': 0.62; 'according': 0.63; 'market': 0.63; 'virus': 0.63; 'free': 0.63; 'applicable': 0.65; 'co.,': 0.65; 'simple,': 0.65; 'contact': 0.66; 'relating': 0.67; 'legal': 0.70; 'offer': 0.71; 'sale': 0.76; 'bank': 0.76; 'investment': 0.78; 'purchase': 0.83; 'affiliates.': 0.84; 'excel.': 0.84; 'prices,': 0.84; '3200': 0.91; 'defect': 0.91; 'excel,': 0.91; 'kind.': 0.91; 'open,': 0.91; 'instrument': 0.95; 'notice.': 0.96 X-DKIM: Sendmail DKIM Filter v2.5.6 sj1.jpmchase.com p56KgfgC008615 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=jpmchase.com; s=smtpout; t=1307392961; bh=rhzljy8pmcPpi7xFBurTWqNGMWMXUiw4kn7Q9ZK jQ9Y=; h=From:To:Date:Subject:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=mp2Zk4pF8ES KR/i0/TbOenB2pdLjpBYVtYt/dni8IM03uuWbQEDT2qnt+Rqca3THHvxHv5EhP1z4Ig fUgV3uGR/c4s3SfkX1GhcRKhCk1jv/Hyhdrgm4NFLIxcd20p6X1So7BQdZre5ToNVkA i0xex1L5ND8o9Lm2Z75/Ynbe+E= From: "Prasad, Ramit" To: "'python-list@python.org'" Date: Mon, 6 Jun 2011 16:18:30 -0400 Subject: RE: How to import data from MySQL db into excel sheet Thread-Topic: How to import data from MySQL db into excel sheet Thread-Index: Acwkefc1EmDNSaJyRpaO8//niuhhZgAC8yNA References: <9ad94241-e281-4325-9c0d-23547ad0b9b9@glegroupsg2000goo.googlegroups.com> <85318329-5bc8-4474-a54e-4e7ff53cd304@k3g2000prl.googlegroups.com> <0604E20B5F6F2F4784C9C8C71C5DD4DD2E348A0CA3@EMARC112VS01.exchad.jpmchase.net> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DLP-FWD: Yes Content-Type: text/plain; charset="us-ascii" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1307393775 news.xs4all.nl 49042 [::ffff:82.94.164.166]:37580 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7110 >>> Currently i am importing the Database into CSV file using csv module, = =0D=0A>>>in csv file i need to change the column width according the size o= f =0D=0A>>>the data=2E i need to set different column width for different c= olumns =0D=0A>>>pleas let me know how to achieve this=0D=0A=0D=0A>xlwt is a= package for editing Excel files=2E CSV, despite being a format=0D=0A>that = Excel can open, is not an Excel file=2E A CSV is to spreadsheets=0D=0A>what= plain text is to word processing=2E It's an extremely simple, easy=0D=0A>t= o use format programaticfally but it doesn't support any formattting=0D=0A>= of any kind=2E=0D=0A=0D=0ATopic says importing into excel, so I assume the = OP is *currently* using CSV but wants to *switch* to Excel=2E If that is tr= ue then the following is the syntax for it=2E Assuming you open a workbook = and create a worksheet within with a local name of "sheet"=2E=0D=0A=0D=0A> = sheet=2Ecol(9)=2Ewidth =3D 3200=0D=0A=0D=0A=0D=0ARamit=0D=0A=0D=0A=0D=0ARam= it Prasad | JPMorgan Chase Investment Bank | Currencies Technology=0D=0A712= Main Street | Houston, TX 77002=0D=0Awork phone: 713 - 216 - 5423=0D=0A=0D= =0AThis communication is for informational purposes only=2E It is not=0D=0A= intended as an offer or solicitation for the purchase or sale of=0D=0Aany f= inancial instrument or as an official confirmation of any=0D=0Atransaction= =2E All market prices, data and other information are not=0D=0Awarranted as= to completeness or accuracy and are subject to change=0D=0Awithout notice= =2E Any comments or statements made herein do not=0D=0Anecessarily reflect = those of JPMorgan Chase & Co=2E, its subsidiaries=0D=0Aand affiliates=2E=0D= =0A=0D=0AThis transmission may contain information that is privileged,=0D= =0Aconfidential, legally privileged, and/or exempt from disclosure=0D=0Aund= er applicable law=2E If you are not the intended recipient, you=0D=0Aare he= reby notified that any disclosure, copying, distribution, or=0D=0Ause of th= e information contained herein (including any reliance=0D=0Athereon) is STR= ICTLY PROHIBITED=2E Although this transmission and any=0D=0Aattachments are= believed to be free of any virus or other defect=0D=0Athat might affect an= y computer system into which it is received and=0D=0Aopened, it is the resp= onsibility of the recipient to ensure that it=0D=0Ais virus free and no res= ponsibility is accepted by JPMorgan Chase &=0D=0ACo=2E, its subsidiaries an= d affiliates, as applicable, for any loss=0D=0Aor damage arising in any way= from its use=2E If you received this=0D=0Atransmission in error, please im= mediately contact the sender and=0D=0Adestroy the material in its entirety,= whether in electronic or hard=0D=0Acopy format=2E Thank you=2E=0D=0A=0D=0A= Please refer to http://www=2Ejpmorgan=2Ecom/pages/disclosures for=0D=0Adisc= losures relating to European legal entities=2E