http://www.perlmonks.org?node_id=211152


in reply to read-excel.pl: a code sample for Spreadsheet::ParseExcel

I am trying to read an Excel spreadsheet and then input the data into an ora db, all on solaris. When using the Spreadsheet::ParseExcel to get the data from the spreadsheet, I am having trouble extracting the data from cells that are formatted as 'Date'. I have done the conversion to text on win32 using variants, but those packages are only for win32. Does anyone know what methods in Spreadsheet::ParseExcel I need to use to extract as text a value from a cell that is set to be a 'Date' in the excel spreadsheet?
  • Comment on Re: read-excel.pl: a code sample for Spreadsheet::ParseExcel

Replies are listed 'Best First'.
Re: Re: read-excel.pl: a code sample for Spreadsheet::ParseExcel
by da (Friar) on Nov 07, 2002 at 19:47 UTC
    As far as I know, you just use Value. What exactly does it output for date cells? When I just ran the above sample code on a linux box, I got a formatted date output where there is a date in the original data (an Excel 2000-formatted spreadsheet).

    ___ -DA $_='daniel@coder.com 519-575-3733 /Prescient Code Solutions/ coder.c +om ';s/-/ /g;s/([.@])/ $1/g;@y=(42*1476312054+7*3,14120504e4,-42*330261-3 +3, 42*5436+3,42*2886+10,42*434987+5);s/(.)/ord(uc($1))/ge;for(@x=split/32 +/; @y; map{print chr} split /(..)/, shift(@x) + shift(@y)) {perlmonk.da.r +u}