in reply to Using Win32::OLE and Excel - Tips and Tricks
What's the advantage to the method you propose for finding the last column and row as opposed to something more like
(Note that the last cell returned by this method does not depend on the Range("A1") specified -- it still returns the last cell properly. For example, N23 (as text $N$23) if N23 were the last cell in the sheet.)
?# Assuming all variables declared in a "my" statement above. # Also assuming $worksheet is pointing to a WorkSheet object. $last_cell = $worksheet->Range("A1")->EntireColumn-> SpecialCells(xlCellTypeLastCell)->{Address}; ($last_col, $last_row) = $last_cell =~ /\$(\w+)\$(\d+)/;
(Note that the last cell returned by this method does not depend on the Range("A1") specified -- it still returns the last cell properly. For example, N23 (as text $N$23) if N23 were the last cell in the sheet.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Last cell?
by cacharbe (Curate) on Jan 28, 2003 at 19:38 UTC | |
by Foggy Bottoms (Monk) on Jun 18, 2003 at 09:35 UTC | |
by Foggy Bottoms (Monk) on Jun 18, 2003 at 09:37 UTC | |
by cacharbe (Curate) on Jun 18, 2003 at 13:35 UTC | |
by Foggy Bottoms (Monk) on Jun 18, 2003 at 13:44 UTC | |
by Nkuvu (Priest) on Mar 04, 2003 at 23:01 UTC | |
Re: Last cell?
by cacharbe (Curate) on Dec 09, 2002 at 17:56 UTC | |
by Anonymous Monk on Mar 18, 2003 at 18:19 UTC | |
by cacharbe (Curate) on Mar 18, 2003 at 19:44 UTC | |
by Anonymous Monk on Mar 19, 2003 at 05:47 UTC | |
by jand (Friar) on Mar 19, 2003 at 06:51 UTC |
In Section
Tutorials