in reply to Re^3: Spreadsheet::XLSX date format problem
in thread Spreadsheet::XLSX date format problem
In the original Spreadsheet::ParseExcel the $cell{Type} attribute above returns "Date".my ( $cell, $col, $k, $row, $sheet ); my $workbook = Spreadsheet::XLSX->new( "test.xlsx" ); foreach $sheet ( @{ $workbook->{Worksheet} } ) { $sheet->{MaxRow} ||= 0; #$sheet->{MinRow}; $sheet->{MaxCol} ||= 0; #$sheet->{MinCol}; next if ( $sheet->{MaxRow} == 0 and $sheet->{MaxCol} == 0 ); foreach $row ( $sheet->{MinRow} .. $sheet->{MaxRow} ) { foreach $col ( $sheet->{MinCol} .. $sheet->{MaxCol} ) { $cell = $sheet->{Cells}[$row][$col]; if ($cell) { foreach $k ( keys %{$cell} ) { print "cell{$k}=$cell->{$k}\n"; } } } } } Results: cell{Type}=Numeric cell{Val}=41840 cell{_Value}=41840 cell{Format}=
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Spreadsheet::XLSX date format problem
by Bethany (Scribe) on Aug 13, 2014 at 00:49 UTC |