This is what you are saying?
... foreach my $worksheet (@{$excel_sheet -> {Worksheet}}) { $worksheet -> {MaxRow} ||= $worksheet -> {MinRow}; # Skip worksheet if it doesn't contain data. next if $worksheet -> {MinRow} > $worksheet -> {MaxRow}; foreach my $row ($worksheet->{MinRow} .. $worksheet->{MaxRow}) { # Send flag as DONE once it reach the end of file or if there is + no data send_data( zipcode => 'DONE', # Flag ); # Correct values or skip them: next unless defined $worksheet->{Cells}[$row][0]->{Val}; warn Dumper $worksheet->{Cells}[$row][0]->{Val}; if ( $worksheet->{Cells}[$row][0]->{Val} =~ /^\d{5}/ ) { my $xlsx_rows = $worksheet->{Cells}[$row]; # Send data send_data( zipcode => $xlsx_rows->[0]->{Val} || '', firstname => $xlsx_rows->[1]->{Val} || '', lastname => $xlsx_rows->[2]->{Val} || '', ); } } } ...

It still gets the data with the "DONE" on top.

In reply to Re^4: Reading a spreadsheet by Anonymous Monk
in thread Reading a spreadsheet by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.