You can test for definedness.
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; use Excel::Writer::XLSX; use Spreadsheet::ParseXLSX; { my $workbook = 'Excel::Writer::XLSX'->new('m.xlsx'); my $worksheet = $workbook->add_worksheet; my $f = $workbook->add_format; $worksheet->merge_range(2, 2, 3, 3, undef, $f); $worksheet->merge_range(4, 4, 5, 5, 'merged', $f); $workbook->close(); } { my $parser = 'Spreadsheet::ParseXLSX'->new; my $workbook = $parser->parse('m.xlsx'); my $worksheet = ($workbook->worksheets)[0]; for my $x (1 .. 5) { for my $y (1 .. 5) { my $cell = $worksheet->{Cells}[$x][$y]; print "[$x,$y] ", defined $cell ? $cell->is_merged : '-'; } print "\n"; } } __END__ [1,1] -[1,2] -[1,3] -[1,4] -[1,5] - [2,1] -[2,2] 1[2,3] 1[2,4] -[2,5] - [3,1] -[3,2] 1[3,3] 1[3,4] -[3,5] - [4,1] -[4,2] -[4,3] -[4,4] 1[4,5] 1 [5,1] -[5,2] -[5,3] -[5,4] 1[5,5] 1
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

In reply to Re^5: Spreadsheet::ParseXLSX question on merged cells by choroba
in thread Spreadsheet::ParseXLSX question on merged cells by chafelix

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.