473,837 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python and Excel

From time to time I see requests for some sort of python MS Excel
I have written just such software 100% python (works with Jython too! at
least it did a year ago).
It was once based (shamelessly) on the the Perl equivalent but now has gone
its own way.
It has been used in anger (i.e. people once payed me money to use it :-) and
includes both generation
and scaning of Excel files. There's even some documentation for the
generation side of the software!

I haven't touched it in a year (my brain exploded and I decided to move to
France to learn French) but if
someone (anyone!) expresses an interest, I can dust it off and offer it up
no questions asked. Just need to know how.


Ian Castleden

PS any jobs for unemployed anglo-saxon Python programmers in France?
Jul 18 '05 #1
3 3231
Hmm, sounds interesting, I've always resorted to using CSV (or even
HTML!) when exporting to Excel.

As far as how to open it up, have a look at creating a project on
www.sourceforge.net or just zip it up and bung it on your own website
if you have one. I've got the feeling there are also Python-specific
repositories too. Or you could just paste the code into a blog or
something free like Livejournal.

Good luck on the France thing, that's where my folks live now (I'm an
Englishman who retreated to the US!)

Jul 18 '05 #2
Please consider this reply as one vote for posting your python Excel
interface/software on the Vaults of Pamassus Web Site. Located at

Jul 18 '05 #3

If it helps, I started a similar project a few years ago on SourceForge when I
was just learning python called python2xlw. I haven't supported it for quite
a while, however, I still use it a lot in my own work.

I needed to create Excel files with scatter charts in them for a web interface
so I went through the excercise of disassembling the BIFF codes of the older
XLW format of excel and creating a byte stream representation of the
spreadsheet that could be saved to file or sent directly to the web user as an
excel application in there browser.

The newer XLS format is a bit more complex and I didn't have enough
documentation to create the charts I needed directly from python in the newer
XLS format. (the current version of excel still understands XLW, however, so
you're just a "SAVE AS" away from XLS.)

As I think was mentioned in another post, you can create charts etc. using the
COM interface for a client-type application, however, my goal was to create
them on-the-fly directly from the web server without launching a server-side
excel application.

There is a nice Perl project called Spreadsheet::Wr iteExcel that John McNamara
created that was very helpful to me at that time, however, it only created the
worksheets, not charts.
Jul 18 '05 #4

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

Similar topics

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 and extract information from specific worksheets and cells. I'm not really sure how to get started with this process. I ran the COM Makepy utility from my PythonWin (IDE from ActiveSTate),
by: rhmd | last post by:
Just found Python and I love it. What an elegant language! I would like to use it for various applications, but the mathematical calculations are way too slow (a million sines 8 seconds in Python vs. 2 seconds in Excel VBA), so was thinking of learning enough C++ to do the number crunching in C++ and integrating the C++ routines with Python. My question: My question: Which compiler works best with Python? I use Windows XP and 98. Have...
by: justin worrall | last post by:
Hi, † I have a very simple python win32 example (gleaned from the O'Reilly book on Win32 programming for Python), of an Excel client with a COM server. Essentially I have three VB buttons - start_server, stop_server and test_server. The first two do the obvious, the last takes inputs from two cells in the excel sheets, then passes them to the python server which adds them together and returns the result an Excel message dialog. †
by: Kevin T. Ryan | last post by:
Hi Group - I have written a "semi-program" in MS Excel related to running a football pool. I've updated it over the past two years or so, to the point where it is getting pretty advanced. Only, there are a few tricks that I want to add that I could not do in Excel - so I did them in Python :) Except as it stands, the current python scripts have to be run via the command line. Does anyone know how to allow interaction between Excel and...
by: Xiao-Qin Xia | last post by:
I don't like VBA, and want to use python to work with Excel. Does anybody recommend some good documents to begin with? Many thanks, Xiao-Qin
by: sam | last post by:
Hi group, I m wondering which Excel module is good to be used by Python? Thanks Sam
by: mbbx6spp | last post by:
Hi All, I already searched this newsgroup and google groups to see if I could find a Python equivalent to Perl's Template::Extract, but didn't find anything leading to a Python module that had similar functionality. I am a big fan of Python as an OO language and use it for many system admin utilities, webdev and even MS Excel AddIn development, but I have found that Perl's Template::Extract is so invaluable to my web scraping utilities...
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?
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 out after googling for the last 3 days. I have written a large python script which inside of it creates an Excel table, the name of this file and how many objects can change for each project i run.
by: AleydisGP | last post by:
I have a .plt file (which is a tab delimited ASCII file) and I want to format it to get a .dbf with data in rows and columns, detele some rows/columns and substitute decimal '.' with ','. All this using Python (I'm using Pythonwin). The .plt file looks like this: * ISCST3 (02035): Tersa * MODELING OPTIONS USED: * CONC URBAN ELEV DFAULT
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 presenter, Adolph Duprť who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.