Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #28087

Re: [pyxl] xlrd-0.8.0 .xlsx formatting_info=True not implemented

Date 2012-08-30 12:57 +1000
From python-excel@raf.org
Subject Re: [pyxl] xlrd-0.8.0 .xlsx formatting_info=True not implemented
References <501944E4.2090902@simplistix.co.uk> <CA+GpVts=-cmJutJxM2KYC-oZ3+FyKpZ5WLzubtUiOY9Nu7Mxiw@mail.gmail.com> <5c84fd3b-c899-4703-867d-ddbc5d1746de@googlegroups.com> <20120829021646.GA8163@raf.org> <CAA2zXtBmev_8w60d236FhxESKNyp3mVRfiv9vqNZ7bWrW9R3=Q@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3955.1346295493.4697.python-list@python.org> (permalink)

Show all headers | View raw


John Yeung wrote:

> > 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.

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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: [pyxl] xlrd-0.8.0 .xlsx formatting_info=True not implemented python-excel@raf.org - 2012-08-30 12:57 +1000

csiph-web