in reply to Re: Win32::OLE and Excel: Iterating when certain row numbers are missing
in thread Win32::OLE and Excel: Iterating when certain row numbers are missing
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Win32::OLE and Excel: Iterating when certain row numbers are missing
by davies (Monsignor) on Jun 21, 2021 at 15:01 UTC | |
|
Re^3: Win32::OLE and Excel: Iterating when certain row numbers are missing
by Corion (Patriarch) on Jun 21, 2021 at 15:03 UTC |