473,396 Members | 1,914 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,396 software developers and data experts.

Python and Microsoft Excel files

I want to import and export Microsoft Excel files.
Are there libraries for this ?

If someone have advices to give, I'm interested !

--
Mérouze Benoît
EPITA SIGL Promotion 2005
be************@epita.fr
be************@gouarec.com
Jul 18 '05 #1
3 6640
Am Mon, 15 Mar 2004 21:40:43 +0000 schrieb ben-:
I want to import and export Microsoft Excel files.
Are there libraries for this ?

If someone have advices to give, I'm interested !


Hi,

you can save the excel file as xml and then parse
it with this recipe:

http://aspn.activestate.com/ASPN/Coo.../Recipe/192914

This works on unix, too, since you just need an xml parser.

HTH,
Thomas

Jul 18 '05 #2
ben- <be************@epita.fr> wrote in message news:<20040315214043.2814f549.be************@epita .fr>...
I want to import and export Microsoft Excel files.
Are there libraries for this ?

If someone have advices to give, I'm interested !


There are three approaches to this:

1) If you have a machine with Excel installed, you can
use pywin32 to automate the application to extract
cells or ranges or to save the data as CSV or XML etc.

2) If you are in a position to do so, you could require
that the originator of the data (might be you) save
it as CSV or XML or some other format which Python can
easily read. Obviously, you might lose information
that way: depends on what the requirement is.

3) You can investigate the work done by others on the
Excel file format and do something equivalent in
Python, or wrap an existing solution.

See: http://chicago.sourceforge.net/devel/docs/excel/

Don't know how difficult this might be, but
if you did it you'd not only answer your own question,
but you'd also be able to respond to future requests
by saying: look at http://...

HTH
TJG
Jul 18 '05 #3
ben- <be************@epita.fr> wrote in message news:<20040315214043.2814f549.be************@epita .fr>...
I want to import and export Microsoft Excel files.
Are there libraries for this ?

If someone have advices to give, I'm interested !


See:
Python Programming on Win32
By Mark Hammond, Andy Robinson
http://www.oreilly.com/catalog/pythonwin32/

Also, if you google "Excel group:comp.lang.python.*"
you will get about 1500 hits. Googling "hammond Excel group:comp.lang.python.*"
drops the number down to just over 100.

Cheers.
Jul 18 '05 #4

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

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
10
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. ...
6
by: ÒÊÃÉɽÈË | last post by:
i want to compare the content in excel,but i don't know whick module to use! can you help me?
6
by: Anand | last post by:
Hello, Can I get some help on how to read the excel files using python? from win32com.client import Dispatch xlApp = Dispatch("Excel.Application") xlWb = xlApp.Workbooks.Open("Read.xls")...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 402 open ( +6) / 3360 closed ( +6) / 3762 total (+12) Bugs : 861 open ( -3) / 6114 closed (+27) / 6975 total (+24) RFE : 228 open...
3
by: dan_roman | last post by:
Hi, I developed a script with a nice interface in Tkinter that allows me to edit some formulas and to generate an Excel worksheet with VBA macros within it. The script runs perfectlly in Office...
4
by: michael.pearmain | last post by:
Hi Experts, Looking for a very quick bit on of advice on how to make some python code run. I'm a newbie to both VBA and Python, so i apologise if this is very easy but i'm about to tear my hair...
4
by: The Night Blogger | last post by:
Is there a way to push data to Microsoft Excel & Word from a Python Application Is this a cross platform feature ? I'll need to push data on MS Windows & Mac OS X ....
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
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.