Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Excel database module

Reply
Thread Tools

Excel database module

 
 
Garret McGraw
Guest
Posts: n/a
 
      05-09-2004
Has anybody heard of or know of a python module for
reading/parsing/writing microsoft excel databases?
Any response would be greatly appreciated.

Thanks,
GEM

 
Reply With Quote
 
 
 
 
Dennis Lee Bieber
Guest
Posts: n/a
 
      05-10-2004
On Sun, 09 May 2004 18:38:04 -0400, Garret McGraw
<> declaimed the following in comp.lang.python:

> Has anybody heard of or know of a python module for
> reading/parsing/writing microsoft excel databases?
> Any response would be greatly appreciated.
>

Assuming this is meant to run on a Windows system that also has
Excel installed, the common view is: let Excel do the work -- ie, use
the win32 python extensions to access the Excel system as a COM object
(hope I have the proper terminology -- I've not done it).

--
> ================================================== ============ <
> | Wulfraed Dennis Lee Bieber KD6MOG <
> | Bestiaria Support Staff <
> ================================================== ============ <
> Home Page: <http://www.dm.net/~wulfraed/> <
> Overflow Page: <http://wlfraed.home.netcom.com/> <

 
Reply With Quote
 
 
 
 
Brian Kelley
Guest
Posts: n/a
 
      05-10-2004
Dennis Lee Bieber wrote:
> On Sun, 09 May 2004 18:38:04 -0400, Garret McGraw
> <> declaimed the following in comp.lang.python:
>
>
>>Has anybody heard of or know of a python module for
>>reading/parsing/writing microsoft excel databases?
>>Any response would be greatly appreciated.
>>

I have not found a good reader yet, although there is a capable writer here:

http://sourceforge.net/projects/pyxlwriter/

There is a perl module that can read and write excel documents that this
package is based on.

If you follow the COM route, do your self a favor and pick up a copy of
Python Win32 Programming.

Brian

 
Reply With Quote
 
Thomas Guettler
Guest
Posts: n/a
 
      05-10-2004
Am Sun, 09 May 2004 18:38:04 -0400 schrieb Garret McGraw:

> Has anybody heard of or know of a python module for
> reading/parsing/writing microsoft excel databases?
> Any response would be greatly appreciated.


Hi,

you can store the files as xml and process this.

Maybe this helps you:
http://aspn.activestate.com/ASPN/Coo.../Recipe/192914

Thomas



 
Reply With Quote
 
Cy Edmunds
Guest
Posts: n/a
 
      05-10-2004
"Garret McGraw" <> wrote in message
news:mailman.382.1084143082.25742.python-...
> Has anybody heard of or know of a python module for
> reading/parsing/writing microsoft excel databases?
> Any response would be greatly appreciated.
>
> Thanks,
> GEM
>


If you really mean "database" you can do whatever you like using odbc. Fire
up your Data Sources program (under Control Panel/Administrative Tools in
XP) and do an Add/Microsoft Excel Driver. You will have to browse for the
Excel file and give the connection a name. Let's say you pick "Melvin". Then
in Python:

import odbc
import dbi
dbc = odbc.odbc("Melvin")
crsr = dbc.cursor()
sql = "select foo from bar;"
crsr.execute(sql)
print crsr.fetchone()
dbc.close()

"bar" is a named range in the workbook which contains column headings, one
of which is "foo". If it looks like:

foo baz bref
2 3 5
7 9 1

your program will print out:

(2,)

How well does all this work in practice? No idea. I just tried it for the
first time and all I can say is it worked OK for my trivial example.

--
Cy
http://home.rochester.rr.com/cyhome/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
GridView to Excel then Excel to database table. mohaaron@gmail.com ASP .Net 0 11-06-2007 06:40 PM
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= ASP .Net 15 10-24-2007 01:34 PM
exporting an excel file from database; making changes to excel file and updating the database by importing it back Luis Esteban Valencia ASP .Net 1 01-12-2005 12:28 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57