in reply to Re^5: Excel to CSV datetime conversion- format changes
in thread Excel to CSV datetime conversion- format changes

Try
foreach my $sheet (0 .. $sheets - 1) { $eSheet = $eBook->{Worksheet}[$sheet]; $sheetName = $eSheet->{Name}; #print "#Worksheet $sheet: $sheetName\n"; next unless (exists ($eSheet->{MaxRow}) and (exists ($eSheet->{MaxCo +l}))); foreach my $row ($eSheet->{MinRow} .. $eSheet->{MaxRow}) { foreach my $column ($eSheet->{MinCol} .. $eSheet->{MaxCol}) { my $cell = $eSheet->{Cells}[$row][$column]; if (defined $cell){ if (defined $cell->{Type} && $cell->{Type} eq 'Date'){ print ExcelFmt($datefmt, $cell->unformatted() ) . ","; } else { print $cell->value() . ","; } } else { print ","; } } print "\n"; } }
poj

Replies are listed 'Best First'.
Re^7: Excel to CSV datetime conversion- format changes
by vsmeruga (Acolyte) on Apr 25, 2014 at 12:34 UTC

    Thanks Poj. It helped me to see the all the date fields in a standard format(dd/mm/yyyy). I am happy for the output as of today. If anything I would require comeback to you. Thanks all of you for helping on this to get to this point. Thanks PERLMONKS!!