Thanks for your prompt response!
Well, I knew that my approach would not work as-is, because inserting/deleting rows/columns will cause a one-off error, which the counter would have to account for by incrementing/decrementing.
I'm glad you pointed out that the spreadsheet does indeed have sequential rows, and the "missing" rows are only "invisible" rows. With this knowledge, I'm thinking that I could look for a "Hidden" attribute on rows/cells.
for (my $i = $min_row; $i <= $max_row; $i++) { my $current_cell = $sheet->cells($i, 1); if ( $current_cell->("Hidden") ) { next; } ... ### Do clever row insertions here. ### Increment $i as needed. }
Of course, a little bit of googling suggests that Win32::OLE does not surface a "hidden" or "visible" property. Any other ideas?
In reply to Re^2: Win32::OLE and Excel: Iterating when certain row numbers are missing
by ownlifeful
in thread Win32::OLE and Excel: Iterating when certain row numbers are missing
by ownlifeful
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |