I'm a business analyst who does this kind of thing for a living...
I pull reports from legacy systems and format them into Excel reports.
I know, my life sucks.
Fortunately for me, I discovered perl and now do all my data
munging outside of Excel. However, I used to write VBA macros
to do the job.
If you want to find the last row in a range of data, the VBA
construct is the following (assuming your block of data starts
in column A):
(This assumes that the value of the 'xlUp' constant in VBA is
constant across different copies and versions of Excel. To check,
open the macro editor in Excel (F11), open the "Immediate" window
under the View menu and type xlUp to obtain its value.
Alternatively, you could figure out what I could not and determine
how to bring those constants into perl. I've yet to figure
out how to pull that off - I know they're in the OLE Excel object,
I just don't know how to reference them.
Anyone?
Hope that helped.
Cluka
Comment on Re: Error getting number of rows in excel.