Re: How do I read Excel file in Python?

2006-10-06 Thread John Machin
Giles Brown wrote: > John Machin wrote: > > [EMAIL PROTECTED] wrote: > > > > > >>> excel_date = 38938.0 > > > > > >>> python_date = datetime.date(1900, 1, 1) + > > > > > >>> datetime.timedelta(days=excel_date) > > > > > >>> python_date > > > > > datetime.date(2006, 8, 11) > > > > > > > > Err, tha

Re: How do I read Excel file in Python?

2006-10-06 Thread kath
John Machin wrote: > [EMAIL PROTECTED] wrote: > > > > >>> excel_date = 38938.0 > > > > >>> python_date = datetime.date(1900, 1, 1) + > > > > >>> datetime.timedelta(days=excel_date) > > > > >>> python_date > > > > datetime.date(2006, 8, 11) > > > > > > Err, that's the wrong answer, isn't it? Perhap

Re: How do I read Excel file in Python?

2006-10-06 Thread Giles Brown
John Machin wrote: > [EMAIL PROTECTED] wrote: > > > > >>> excel_date = 38938.0 > > > > >>> python_date = datetime.date(1900, 1, 1) + > > > > >>> datetime.timedelta(days=excel_date) > > > > >>> python_date > > > > datetime.date(2006, 8, 11) > > > > > > Err, that's the wrong answer, isn't it? Perhap

Re: How do I read Excel file in Python?

2006-10-06 Thread Simon Brunning
On 5 Oct 2006 12:49:53 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Actually was about to post same solution and got same results. (BTW > Simon, the OP date is Aug 9th, 2006). Scratched head and googled for > excel date calculations... found this bug where it treats 1900 as leap > year in

Re: How do I read Excel file in Python?

2006-10-05 Thread John Machin
[EMAIL PROTECTED] wrote: > > > >>> excel_date = 38938.0 > > > >>> python_date = datetime.date(1900, 1, 1) + > > > >>> datetime.timedelta(days=excel_date) > > > >>> python_date > > > datetime.date(2006, 8, 11) > > > > Err, that's the wrong answer, isn't it? Perhaps it shoud be > > datetime.date(190

Re: How do I read Excel file in Python?

2006-10-05 Thread houdinihound
> > >>> excel_date = 38938.0 > > >>> python_date = datetime.date(1900, 1, 1) + > > >>> datetime.timedelta(days=excel_date) > > >>> python_date > > datetime.date(2006, 8, 11) > > Err, that's the wrong answer, isn't it? Perhaps it shoud be > datetime.date(1900, 1, 29)? Actually was about to post sa

Re: How do I read Excel file in Python?

2006-10-05 Thread Simon Brunning
On 10/5/06, Simon Brunning <[EMAIL PROTECTED]> wrote: > On 5 Oct 2006 10:25:37 -0700, Matimus <[EMAIL PROTECTED]> wrote: > > > the date( 8/9/2006 ) in Excel file, i am getting the value as 38938.0, > > > which I get when I convert date values to general format in Excel. I > > > want the actual date

Re: How do I read Excel file in Python?

2006-10-05 Thread Simon Brunning
On 5 Oct 2006 10:25:37 -0700, Matimus <[EMAIL PROTECTED]> wrote: > > the date( 8/9/2006 ) in Excel file, i am getting the value as 38938.0, > > which I get when I convert date values to general format in Excel. I > > want the actual date value. How do get that? > > 38938 appears to be the date in d

Re: How do I read Excel file in Python?

2006-10-05 Thread Steve Holden
Matimus wrote: >>the date( 8/9/2006 ) in Excel file, i am getting the value as 38938.0, >>which I get when I convert date values to general format in Excel. I >>want the actual date value. How do get that? > > > 38938 appears to be the date in days since 1/1/1900. I'm sure someone > can help you

Re: How do I read Excel file in Python?

2006-10-05 Thread Matimus
> the date( 8/9/2006 ) in Excel file, i am getting the value as 38938.0, > which I get when I convert date values to general format in Excel. I > want the actual date value. How do get that? 38938 appears to be the date in days since 1/1/1900. I'm sure someone can help you figure out how to conver

Re: How do I read Excel file in Python?

2006-10-05 Thread kath
John Machin wrote: > kath wrote: > > How do I read an Excel file in Python? > > > > I have found a package to read excel file, which can be used on any > > platform. > > Hi Sudhir, > So far, so good :-) > > > > > http://www.lexicon.net/sjmachin/xlrd.htm > > I installed and working on the examples,

Re: How do I read Excel file in Python?

2006-10-05 Thread John Machin
kath wrote: > How do I read an Excel file in Python? > > I have found a package to read excel file, which can be used on any > platform. Hi Sudhir, So far, so good :-) > > http://www.lexicon.net/sjmachin/xlrd.htm > I installed and working on the examples, I found its printing of cell's > content

How do I read Excel file in Python?

2006-10-05 Thread kath
How do I read an Excel file in Python? I have found a package to read excel file, which can be used on any platform. http://www.lexicon.net/sjmachin/xlrd.htm I installed and working on the examples, I found its printing of cell's contents in a different manner. >>> import xlrd >>> book=xlrd.open