473,398 Members | 2,404 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,398 software developers and data experts.

Excel database module

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

Jul 18 '05 #1
4 2185
On Sun, 09 May 2004 18:38:04 -0400, Garret McGraw
<ga***********@yahoo.com> 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).

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

Jul 18 '05 #2
Dennis Lee Bieber wrote:
On Sun, 09 May 2004 18:38:04 -0400, Garret McGraw
<ga***********@yahoo.com> 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

Jul 18 '05 #3
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

Jul 18 '05 #4
"Garret McGraw" <ga***********@yahoo.com> wrote in message
news:ma**************************************@pyth on.org...
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/
Jul 18 '05 #5

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

Similar topics

11
by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit excel. My problem is that if I try and do it...
3
by: Mads Petersen | last post by:
I'm stuck in this code. Hope you can and will help me. I launch it from excel. I have made the following code work, but not as i whant. I need the ranges to be working with something like xlDown....
4
by: Marcus | last post by:
I am using the following command to open a query in Excel: DoCmd.OutputTo acOutputQuery, "qryTest", acFormatXLS, , True The problem is that the code creates an Excel 97 file. Is there a way...
1
by: michb | last post by:
I need to export data from access to an excel database to calculate times and wages for the week but the code that I entered doesn't seem to like either me or the database! I need it to go to one...
21
by: bobh | last post by:
Hi All, In Access97 I have a table that's greater than 65k records and I'm looking for a VBA way to export the records to Excel. Anyone have vba code to export from access to excel and have the...
1
by: garry.oxnard | last post by:
Can anyone help me to solve a problem which involves switching from Access to Excel (then back to Access) programatically please? I have an Excel template which, on open, also opens an Access...
2
by: madeleine | last post by:
I'm hoping the answer to this is that I'm just doing something silly, but I'm really scratching my head over this one. I'm importing data from multiple workbooks, each workbook has a sheet called...
1
by: baling | last post by:
Hi.... Hi everybody, i have a code that i make in VBA and know I want to use this code in to VB6. But i don't know how to use that code in to VB 6.0 Please correct this code so i can use it in VB...
4
by: Henry Stockbridge | last post by:
Hi, I am using Access 2003 to automate an Excel workbook, but after the code completes Excel does not quit (at least it is still listed in Task Manager --Processes.) I have set a reference to...
0
NeoPa
by: NeoPa | last post by:
Many of us have noticed that there are some very useful functions available to you when using Excel, but these same functions are not available, as standard, in Access. A particular issue I had...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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.