Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel active rows
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00792018
Message ID:
00792039
Vues:
27
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform