Newbie - Exporting Excel Spreadsheet
M.Kollenaar at slo.nl
Thu Dec 6 16:21:25 CET 2001
Is it also possible to fetch text from a Word2000 document with Python and a
bunch of modules?
"StationSteve" <Steven.Suchting at computer.org> schreef in bericht
news:3C0F7CFC.B7E73192 at computer.org...
> You might want to go to your local bookstore and find a copy of "Python -
> Programming on Win32", by Mark Hammond & Andy Robinson, published by
> O'Reilly (Crocodile on the cover). Chapter 9 talks about Excel, and I
> found it *VERY* useful in some work I did in controlling Excel from a
> Python program.
> James Fugard wrote:
> > TIA for any help that I may get. I have a small project that I'm
> > trying to do in Python...and I'm a hack at best! Here is what I'm
> > trying to do. Call and capture a row in an Excel spreadsheet and then
> > use manipulate the data in the cell of the various columns.
> > Here is what I've been able to get some far:
> > # Call all used modules
> > import os,win32api,glob,odbc,dbi,time
> > # Make the database connection using the system DNS
> > MyConnection = odbc.odbc('Client_Data_Log')
> > MyCursor = MyConnection.cursor()
> > MyCursor.execute('SELECT * FROM "Client Data Log$"') # the sheet name
> > print MyCursor.fetchall()
> > This will give me everything + a bunch of dbi time stuff. If someone
> > could tell me where to find info on calling a particular cell or a
> > piece of sample code to follow(like G12 for example) that would be
> > great. Thanks again. James
More information about the Python-list