Leser: 10
![]() |
|< 1 2 3 >| | ![]() |
22 Einträge, 3 Seiten |
QuoteCAUTION : The atributes of Workbook may not be complete. This function will be called almost order by rows and columns. Take care almost, not perfectly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
my $excel_handle = Spreadsheet::ParseExcel->new( CellHandler => \&get_cell_data, NotSetCell => 1 ); my $current_book = {}; sub get_cell_data { my ($book, $sheet, $row, $col, $cell) = @_; $current_book->{Worksheet}[$sheet]->{Cells}[$row][$col]->{Val} = $cell->{Val}; $current_book->{Worksheet}[$sheet]->{MaxRow} = $row if (!(defined($current_book->{Worksheet}[$sheet]->{MaxRow})) or ($current_book->{Worksheet}[$sheet]->{MaxRow} < $row)); $current_book->{Worksheet}[$sheet]->{MinRow} = $row if (!(defined($current_book->{Worksheet}[$sheet]->{MinRow})) or ($current_book->{Worksheet}[$sheet]->{MinRow} > $row)); $current_book->{Worksheet}[$sheet]->{MaxCol} = $col if (!(defined($current_book->{Worksheet}[$sheet]->{MaxCol})) or ($current_book->{Worksheet}[$sheet]->{MaxCol} < $col)); $current_book->{Worksheet}[$sheet]->{MinCol} = $col if (!(defined($current_book->{Worksheet}[$sheet]->{MinCol})) or ($current_book->{Worksheet}[$sheet]->{MinCol} > $col)); $current_book->{Worksheet}[$sheet]->{Name} = $book->{Worksheet}[$sheet]->{Name} if (!(defined($current_book->{Worksheet}[$sheet]->{Name}))); $current_book->{SheetCount} = ($sheet + 1) if (!(defined($current_book->{SheetCount})) or ($current_book->{SheetCount} < ($sheet + 1))); } my $excel_book = $excel_handle->Parse('test_1.xls'); $excel_book = $current_book;
![]() |
|< 1 2 3 >| | ![]() |
22 Einträge, 3 Seiten |