Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel active rows
Message
From
22/05/2003 22:26:00
 
 
To
22/05/2003 21:46:40
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00792018
Message ID:
00792039
Views:
28
Sorry folks, I might have put you wrong there. It appears that
oExcel = CREATEOBJECT([Excel.Application])
WITH oExcel
    .Workbooks.Open(GETFILE())
    ?.Worksheets("Sheet1").UsedRange.Rows.Count
* or
    ?.ActiveSheet.UsedRange.Rows.Count
    .Workbooks.Close()
ENDWITH
oExcel=.F.
Returns the number of rows used in the sheet.

Regards
Geoff


>Hi Edgar
>
>That is useful but not quite what I want.
>
>I have a program that needs to append rows to the end of a spreadsheet. I want to be able to open the spreadsheet and then determine what is the last used row. Someone once told me how to do this but I have lost it.
>
>I think it has something to do with Range and BottomRightCell, but I am not to sure how to get it working, Yet.
>
>Any pointers.
>
>Regards
>Geoff
>
>>Geoff,
>>take a look at this
>>
>>Re: Accessing Excel Sheet Thread #703274 Message #703291
>>>Hi
>>>
>>>I'm sure I've asked this before but I cant seem to find it.
>>>
>>>How do I determine how many rows (what the data area) is in an excel spreadsheet.
>>>
>>>regards
>>>Geoff Scott
May all your weeds be wildflowers
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform