Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: xlrd 0.8.0 released!

143 views
Skip to first unread message

Chris Withers

unread,
Aug 22, 2012, 10:33:11 AM8/22/12
to Hubert Holin, Python List, python...@googlegroups.com
On 22/08/2012 15:03, Hubert Holin wrote:
> I would like to keep up with the development but would like to know
> which is the repo to follow. The Python-Excel website points to
> https://github.com/python-excel/xlrd, but that one does not have a 0.8.0
> tag (or at least did not have one when I looked a few days ago, and I
> unfortunately can't check now, from work).

Oops, I was very bad... not only did I forget to push the tag (it's
annoying that you have to do a "git push --tags" to get tasg pushed) but
I actually forgot to commit the final change that stamped on the 0.8.0
version number :-S

Fixed and pushed now, thanks for noticing :-)

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

python...@raf.org

unread,
Aug 28, 2012, 10:16:46 PM8/28/12
to python...@googlegroups.com, Python List
hi,

i just tried xlrd-0.8.0 so as to be able to read xlsx files only to discover:

NotImplementedError: formatting_info=True not yet implemented

there's a post from 2009 stating that the current intention is to not
support formatting_info:

https://groups.google.com/forum/?fromgroups=#!topic/python-excel/Thso62fdiSk

is that still the current intention?

if so, is there any other way to tell how many digits excel would round to
when displaying a floating point number? that's my only reason for needing
formatting_info=True.

cheers,
raf

John Yeung

unread,
Aug 29, 2012, 9:27:01 AM8/29/12
to python...@googlegroups.com, Python List
> is there any other way to tell how many digits excel would round to
> when displaying a floating point number? that's my only reason for
> needing formatting_info=True.

I have not personally used it, but OpenPyXL is another option for
working with .xlsx files, and it might provide the formatting info you
need:

http://packages.python.org/openpyxl/index.html
http://pypi.python.org/pypi/openpyxl/1.5.8

John Y.

python...@raf.org

unread,
Aug 29, 2012, 10:57:58 PM8/29/12
to python...@googlegroups.com, Python List
thanks but openpyxl doesn't work well enough.
most of the spreadsheets i need to read contain
dropdown lists with data validation using a named
formula like: OFFSET(Data!$K$2,0,0,COUNTA(Data!$K:$K),1)
which causes openpyxl to throw a NamedRangeException.
i don't even care about the named objects. i just want
to know what's in the cell, not what other possible
values the cell might have had. :-)

apart from that, it does give access to number formats
so your suggestion would work for simpler spreadsheets.

hopefully the intention that xlrd not support formats in xlsx
files will change one day into an intention to support them. :-)

until then my users can keep manually saving xlsx files they
receive as xls before importing them. :-(

maybe i need to investigate some perl modules or pyuno instead.
perl's Spreadsheet::XSLX module handles formats. it gets the
date formats a bit wrong but it's workaroundable.

cheers,
raf

Chris Withers

unread,
Aug 30, 2012, 3:42:30 AM8/30/12
to python...@googlegroups.com, Python List
On 30/08/2012 03:57, python...@raf.org wrote:
>
> hopefully the intention that xlrd not support formats in xlsx
> files will change one day into an intention to support them. :-)

The intention is there, sadly the time to work on it is not.

John Machin would be the person best placed to do the work, if anyone
fancies sponsoring the work, he might be able to direct more time to it..

cheers,

python...@raf.org

unread,
Sep 2, 2012, 8:18:34 PM9/2/12
to python...@googlegroups.com, Python List
Albert-Jan Roskam wrote:

> Hi,
>
> As a work-around, you could use the CRAN R package XLConnect, using
> RPy or RPy2, to do what you want. IIRC it's based on Java, so it's not
> extremely fast.
> http://cran.r-project.org/web/packages/XLConnect/vignettes/XLConnect.pdf
> This is another package I just saw for the first time
>
> http://cran.r-project.org/web/packages/xlsx/xlsx.pdf
>
> Regards,
> Albert-Jan

hi,

many thanks for the suggestions but i've already implemented
an alternative using perl and its Spreadsheet::XLSX module.

cheers,
raf

0 new messages