Libraries for ingesting xls files?

5 views
Skip to first unread message

Dave Brondsema

unread,
Nov 4, 2016, 11:36:23 AM11/4/16
to GRPUG: Grand Rapids Python Users Group
Adam Williams (or anyone),

What are the best libraries for reading in Excel spreadsheets? I know you've
talked about this before, and had recommendations for some libraries over others.

At GiveCamp this weekend the "python team" will likely be doing a lot of XLS
parsing, which is why I ask.


--
Dave Brondsema : da...@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
<><

Adam Tauno Williams

unread,
Nov 4, 2016, 12:09:33 PM11/4/16
to gr...@googlegroups.com
On Fri, 2016-11-04 at 11:36 -0400, Dave Brondsema wrote:
> Adam Williams (or anyone),
> What are the best libraries for reading in Excel spreadsheets? I
> know you've
> talked about this before, and had recommendations for some libraries
> over others.
> At GiveCamp this weekend the "python team" will likely be doing a lot
> of XLS parsing, which is why I ask.

I ingest thousands of XLS files using xlrd. Works flawlessly - but you
still need to know the caveats of Excel.

The biggest GOTCHA is that there is no such thing as a DATE/DATETIME
type. Being a date is a STYLE on an numeric value. xldate_as_tuple is
your friend.

Second is that manually created documents can be confusing about what
is string and what is a number if the data entry person isn't paying
attention.


<https://sourceforge.net/p/coils/coils-code/ci/master/tree/coils/logic/
workflow/formats/xls_reader.py#l71>

--
Adam Tauno Williams <mailto:awil...@whitemice.org> GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA


Richard Nienhuis

unread,
Nov 4, 2016, 1:08:46 PM11/4/16
to gr...@googlegroups.com
Openpyxl is also pretty good if you can only support xlsx files.  (excel 2010+)



--
You received this message because you are subscribed to the Google Groups "GRPUG: Grand Rapids Python Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpug+unsubscribe@googlegroups.com.
To post to this group, send email to gr...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpug.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages