Bolster
Bolster

Reputation: 7906

Python Excel parsing data with xlrd

Fairly simple; I've got the data I want out of the excel file, but can't seem to find anything inside the XLRD readme that explains how to go from this:

xldate:40397.007905092592
number:10000.0
text:u'No'
number:0.1203
number:0.096000000000000002
number:0.126

to their respective python datatypes. Any ideas?

Upvotes: 0

Views: 802

Answers (2)

SK Pillai
SK Pillai

Reputation: 1

I had the same issue and used the following as a last resort:

def numobj2fl(p):
    return float(str(p).split(":")[1])

for converting the 'number object' to float.

Upvotes: 0

shahjapan
shahjapan

Reputation: 14335

did you tried the documentation help --> date_function

Upvotes: 2

Related Questions