473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

csv to xls using python 2.1.3

Hi

I need to convert a .csv file to .xls file using python 2.1.3 which
means I can't use pyExcelerator! Does anyone know how I can do this?

Many thanks
LizzyLiz
Jan 23 '08 #1
6 1750
LizzyLiz wrote:
Hi

I need to convert a .csv file to .xls file using python 2.1.3 which
means I can't use pyExcelerator! Does anyone know how I can do this?

Many thanks
LizzyLiz
Use win32com.client to start Excel, tell it to .Open the .csv
file and then tell it to .SaveAs an Excel workbook.

TJG
Jan 23 '08 #2
Perfect! Thanks :-)

LizzyLiz
Jan 23 '08 #3
LizzyLiz wrote:
Hi

I need to convert a .csv file to .xls file using python 2.1.3 which
means I can't use pyExcelerator! Does anyone know how I can do this?

Many thanks
LizzyLiz
FYI - Excel can read .CSV files directly and convert them to .XLS.

-Larry
Jan 23 '08 #4
On Jan 24, 1:58 am, LizzyLiz <l...@rcsltd.co.ukwrote:
Perfect! Thanks :-)

LizzyLiz
You have an interesting notion of perfection, which may change after
some experience with the proposed solution.

Note that sticking with Python 2.1 precludes your using the Python csv
module as you first proposed, and is shutting you out of an enormous
lot of new functionality. Are you inextricably bound to 2.1?
Jan 23 '08 #5
Unfortunately we have to stick with python 2.1.3 for this project.

Jan 24 '08 #6
On Jan 23, 5:15 pm, Larry Bates <larry.ba...@websafe.comwrote:
FYI - Excel can read .CSV files directly and convert them to .XLS.

-Larry
Thanks Larry

The customer wants 2 buttons - one for csv, one for xls.

Kind regards
Liz
Jan 24 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: The_Incubator | last post by:
As the subject suggests, I am interested in using Python as a scripting language for a game that is primarily implemented in C++, and I am also interested in using generators in those scripts... ...
8
by: Sridhar R | last post by:
Hi, I am a little experienced python programmer (2 months). I am somewhat experienced in C/C++. I am planning (now in design stage) to write an IDE in python. The IDE will not be a simple...
0
by: Adam | last post by:
I have an application which interacts with a webserver over https using client certificates. Due to a bug in openssl 0.9.6, I upgraded to 0.9.7 and rebuilt python. Now, when I access the page...
1
by: David | last post by:
I have this error message poping up when I try to import a module I made in C using the Python/C API. Everything compiles like a charm. Gives me this error message : Traceback (most recent...
8
by: Joakim Persson | last post by:
Hello all. I am involved in a project where we have a desire to improve our software testing tools, and I'm in charge of looking for solutions regarding the logging of our software (originating...
0
by: Richard Taylor | last post by:
User-Agent: OSXnews 2.07 Xref: number1.nntp.dca.giganews.com comp.lang.python:437315 Hi I am trying to use py2app (http://undefined.org/python/) to package a gnome-python application...
29
by: 63q2o4i02 | last post by:
Hi, I'm interested in using python to start writing a CAD program for electrical design. I just got done reading Steven Rubin's book, I've used "real" EDA tools, and I have an MSEE, so I know what...
23
by: Python Maniac | last post by:
I am new to Python however I would like some feedback from those who know more about Python than I do at this time. def scrambleLine(line): s = '' for c in line: s += chr(ord(c) | 0x80)...
3
by: Alexnb | last post by:
Okay, I tried to follow that, and it is kinda hard. But since you obviously know what you are doing, where did you learn this? Or where can I learn this? Maric Michaud wrote:...
0
by: rajasankar | last post by:
Hi, I am using Jython based application and trying to use inspect.py in the python files. Here is my code import inspect,os,sys,pprint,imp def handle_stackframe_without_leak(getframe): ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.