Have you tried adding more print statements to find out where your program stops?
The most likely suggestion would be that the seventh workbook is empty, in the sense that it has no filled rows or columns:
my $worksheet = $workbook->worksheet(6);
I really, really recommend using a name-based approach instead of using indices to access the sheets if you have problem with converting from one-based offsets to zero-based offsets.
<code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>