On Apr 15, 2006, at 12:13 AM, Kevin Windham wrote:
On Apr 14, 2006, at 8:24 PM, Jeremy Clifton wrote:
I could guess the largest possible value (the largest one I have
has 3680 rows) and set the max value of i in the For loop. I was
hoping to avoid a call from the client wondering why the program
wasn't processing all the lines of the spreadsheet (in the case
that one of the ones they have has more rows, or a later
spreadsheet is added that has more rows). The down side to that
(and really the other approach) is that if the spreadsheet being
processed has only 500 rows with data ... then I waste time
looping through another 3000+ empty cells ... and this seems to
take a l-o-n-g time.
How about using .value or .text or whatever may be appropriate to
see if there is anything in the cell. Keep a count of how many
blank cells you've found and exit the loop after some appropriate
number of blanks.
Oooh ... good idea! I'll do that. Thanks!
Jeremy
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>