473,761 Members | 3,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ANNOUNCE: xlrd 0.5.2 -- extract data from Excel spreadsheets

I am pleased to announce a new general release (0.5.2) of xlrd, a Python
package for extracting data from Microsoft Excel spreadsheets.

CHANGES:

* Book and sheet objects can now be pickled and unpickled. Instead of
reading a large spreadsheet multiple times, consider pickling it once
and loading the saved pickle; can be much faster.

* Now works with Python 2.1. Backporting to Python 2.1 was partially
funded by Journyx - provider of timesheet and project accounting
solutions (http://journyx.com/)

* open_workbook() can be given the contents of a file instead of its name.

* Now more tolerant of files written in unexpected ways by 3rd party
software.

* Speed improvements. Minor bugfixes.

MAIN FEATURES OF xlrd:

* Library for developers; not a tool for end-users.

* Platform-independent pure Python – you don't need Windows, Excel,
COM, ...

* Handles all Excel file versions back to 3.0.

* Strong support for Excel dates.

AVAILABLE FROM:

http://cheeseshop.python.org/pypi/xlrd

http://www.lexicon.net/sjmachin/xlrd

ENQUIRIES:

E-mail to sjmachin at lexicon.net with [xlrd] in the subject.

Cheers,
John

Mar 18 '06 #1
15 4119
John Machin wrote:
I am pleased to announce a new general release (0.5.2) of xlrd, a Python
package for extracting data from Microsoft Excel spreadsheets.


How does xlrd compare with pyexcelerator? At a glance they look pretty
similar.

Thanks,
Kent
Mar 18 '06 #2
On 19/03/2006 8:31 AM, Kent Johnson wrote:
John Machin wrote:
I am pleased to announce a new general release (0.5.2) of xlrd, a Python
package for extracting data from Microsoft Excel spreadsheets.

How does xlrd compare with pyexcelerator? At a glance they look pretty
similar.


I have an obvious bias, so I'll just leave you with a not-very-PC
analogy to think about:

Depending on the ambient light and the quantity of mead drunk in the
hall, Helen of Troy and Grendel's mum might at a glance look pretty
similar, too. Perhaps a more thorough investigation is needed. What
about your requirements: a partner for the graduation ball, or someone
to lift the truck off you when the jack collapses?

Cheers,
John
Mar 19 '06 #3
- xlrd seems to be focused on extracting data.
- pyexcelerator can also generate Excel files.

Mar 19 '06 #4
John Machin wrote:
On 19/03/2006 8:31 AM, Kent Johnson wrote:
How does xlrd compare with pyexcelerator? At a glance they look pretty
similar.


I have an obvious bias, so I'll just leave you with a not-very-PC
analogy to think about:

Depending on the ambient light and the quantity of mead drunk in the
hall, Helen of Troy and Grendel's mum might at a glance look pretty
similar, too. Perhaps a more thorough investigation is needed. What
about your requirements: a partner for the graduation ball, or someone
to lift the truck off you when the jack collapses?


That didn't shed much light. I'm interested in your biased opinion,
certainly you must have had a reason to write a new package.

I don't have current requirements for this, I'm curious.

Kent
Mar 19 '06 #5
On 19/03/2006 2:30 PM, Kent Johnson wrote:
John Machin wrote:
On 19/03/2006 8:31 AM, Kent Johnson wrote:
How does xlrd compare with pyexcelerator? At a glance they look
pretty similar.


I have an obvious bias, so I'll just leave you with a not-very-PC
analogy to think about:

Depending on the ambient light and the quantity of mead drunk in the
hall, Helen of Troy and Grendel's mum might at a glance look pretty
similar, too. Perhaps a more thorough investigation is needed. What
about your requirements: a partner for the graduation ball, or someone
to lift the truck off you when the jack collapses?

That didn't shed much light. I'm interested in your biased opinion,
certainly you must have had a reason to write a new package.

I don't have current requirements for this, I'm curious.


* It's not new. First public release was on 2005-05-15. When I started
writing it, there was no pure-Python Excel reading facility available at
all. Roman Kiseliov's pyExcelerator was first announced on c.l.py.ann
on 2005-03-22 (write only) and later with an import facility on 2005-05-12.

* I wrote it because I needed to get data out of Excel spreadsheets in a
production environment. I had tried COM, ODBC, and manual save-as-CSV
and all those approaches were unsatisfactory in terms of reliability and
robustness.

* Creating Excel files: xlrd doesn't do this. If you have Python 2.4,
pyExcelerator is the best choice. The alternative is PyXLWriter which
works with Python 2.2 onwards but is no longer maintained and writes
only the older Excel 5.0 / Excel 95 file format (no Unicode support,
limited to 16K rows).

* Herewith the biased comparison:
[I've CCed Roman on this & the previous posting, by the way]

** Python versions: xlrd 2.1 to 2.4, pyExcelerator 2.4 only

** Excel file versions: xlrd 3.0 onwards, pyExcelerator 5.0 onwards [I
doubt there are many 3.0, 4S and 4W files hanging about but I had some
Excel 4.0 files so I did it as a jeu d'esprit]

** Date support: Excel stores dates as real numbers of days sort-of
since some variable date ... a long shocking story, read the xlrd docs.
xlrd puts considerable effort into examining the formats used by number
cells so that they can be classifed as date or not-date. It provides
functions for converting between Excel date numbers and datetime tuples.

** Speed: On a 3.2GHz Intel P4 with 1 GB of RAM, xlrd loads a 128 Mb
spreadsheet [yes sir, real live user data] in a little over a minute,
while pyExcelerator takes a little over 3 minutes. Taking out half of
that memory doesn't bother xlrd at all, but ...

** Memory footprint: pyExcelerator can use from 2.5 to 4 times as much
memory as xlrd.

** Docs: xlrd has docs.

Hoping that shed some light :-)
Cheers,
John
Mar 19 '06 #6
John Machin wrote:
On 19/03/2006 2:30 PM, Kent Johnson wrote:
That didn't shed much light. I'm interested in your biased opinion,
certainly you must have had a reason to write a new package.


* It's not new. First public release was on 2005-05-15. When I started
writing it, there was no pure-Python Excel reading facility available at
all. Roman Kiseliov's pyExcelerator was first announced on c.l.py.ann
on 2005-03-22 (write only) and later with an import facility on 2005-05-12.


Ah, my mistake, sorry. I didn't recall hearing about xlrd before and
jumped to the conclusion that it was new, though your OP is very clear
that this is an update release.
* Herewith the biased comparison:


Thank you!

Kent
Mar 19 '06 #7
Kent Johnson wrote:
John Machin wrote:

* Herewith the biased comparison: ....


Thank you!


Thank you (John) as well. I realize you are a bit reluctant to toot
your own horn, but it is just this kind of biased comparison that
let's us know whether to investigate further. It also helps that
you mention what pyExcelerator is good at.

--
-Scott David Daniels
sc***********@a cm.org
Mar 19 '06 #8
John

Thanks for walking us through the comparison. On the xlrd website I
saw that it does not import formulas from the Excel files, which is
what I'm looking for. Any suggestions?

Juan C.

Mar 20 '06 #9
On 20/03/2006 9:28 PM, jcmendez wrote:
John

Thanks for walking us through the comparison. On the xlrd website I
saw that it does not import formulas from the Excel files, which is
what I'm looking for. Any suggestions?

Juan C.

Juan, what do you want to do with the formulas after importing them?
Pretty-print them? Evaluate them?
Cheers,
John
Mar 20 '06 #10

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

Similar topics

11
2565
by: Tempo | last post by:
Hello. I am getting the error that is displayed below, and I know exactly why it occurs. I posted some of my program's code below, and if you look at it you will see that the error terminates the program pre-maturely. Becasue of this pre-mature termination, the program is not able to execute it's final line of code, which is a very important line. The last line saves the Excel spreadsheet. So is there a way to make sure the last line...
6
11175
by: james.igoe | last post by:
I've been hired to produce a reporting database that takes data from numerous sources (5 financial products, from three regions, each with multiple tabs) and although I'm confident I can build fairly robust ETL procedures, controlling for all the vagaries of Excel, I was wondering if there were finished products, e.g., purchaseable software, that would save the time and energy of building from scratch. Are there any polished ETL...
2
2436
by: BrendanC | last post by:
I've started learninhg Python and have developed a small Python app that imports Excel data into an Access mdb/jet database. This application has dependencies on the following: XLRD - http://cheeseshop.python.org/pypi/xlrd/0.5.2 - (to read Excel files) Python windows extensions - http://starship.python.net/crew/mhammond/win32/ - to use ADO wxPython GUI toolkit - http://www.wxpython.org/ - for the GUI interface
2
5008
by: kylancal | last post by:
I am trying to read an Excel book with XLRD and I am getting the following error Traceback (most recent call last): File "C:\temp\ReadGoldmanExcelFiles.py", line 62, in <module> startRow = 0, sh_idx = 0, path2 = '//otaam.com/root/SharedFiles/ GlobeOp/Risk/Cal Projects/temp/') File "C:\temp\ReadGoldmanExcelFiles.py", line 36, in excelTocsv book = xlrd.open_workbook(infile) File "C:\Python25\lib\site-packages\xlrd\__init__.py", line 362,...
3
4302
by: waldopat | last post by:
Hi all, I have an excel doc that has some information about various countries and I want to get a list of all the countries, which is in Column A. But, when I try to iterate over column A, I get this error: Traceback (most recent call last): File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Documents and Settings\PW\My...
1
1640
by: Kelie | last post by:
Hello, I tried using xlrd to read an Excel file and kept getting this error: AttributeError: 'Book' object has no attribute 'mem' AttributeError: 'Book' object has no attribute 'mem' AttributeError: 'Book' object has no attribute 'mem'
1
7857
by: Krishna | last post by:
I want to delete some rows (by creating a loop may be) using xlrd. Is this possible, if not how do I do that with python? Please help Thanks Krishna
1
4173
by: Edwin.Madari | last post by:
here is working code that will read & display contents of all rows & columns in all the sheets, you need xlrd 0.6.1 import xlrd, os, sys book = xlrd.open_workbook(sys.argv) print "The number of worksheets is", book.nsheets for shx in range(book.nsheets): sh = book.sheet_by_index(shx) print 'tab:%s rows:%s cols:%s ' % (sh.name, sh.nrows, sh.ncols) for rx in range(sh.nrows):
2
9721
by: patrick.waldo | last post by:
Hi all, I am trying to figure out a way to read colors with xlrd, but I did not understand the formatting.py module. Basically, I want to sort rows that are red or green. My initial attempt discovered that text:u'test1.txt' (XF:22) text:u'test2.txt' (XF:15) text:u'test3.txt' (XF:15) text:u'test4.txt' (XF:15) text:u'test5.txt' (XF:23)
0
9522
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10111
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, 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...
1
9902
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7327
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 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...
0
6603
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();...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2738
bsmnconsultancy
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.