Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding out programmatically how many rows in excel.
Message
De
28/01/2003 10:26:19
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00745897
Message ID:
00746199
Vues:
25
Try This:

Note that oWorkBook.WorkSheets(1).UsedRange.Rows returns another range object consisting of all the rows in the used range, not an integer.
Local lnRows, lcEndPoint
lnRows = oWorkBook.Worksheets(1).UsedRange.Rows.Count
lcEndPoint = "T" + Alltrim(Str(lnRows))

oWorkBook.WorkSheets(1).Range("A1",lcEndPoint).Select

* etc.
Alan

>
>Okay,
>
> Here is the code I am using could you please demonstrate how I would incorporate that into my code....
>
>
>local lnRows
>lnRows=oWorkBook.Worksheets(1).UsedRange.Rows
>
>oWorkBook.Worksheets(1).Range("A1:T1").Select
>oWorkBook.SaveAs(sys(5)+curdir+'upenviro3.dbf', 8)
>
>
>I am trying to save Cell A + lnrows to T + lnrows, the way it is I get only the 1st row... I don't know the right syntax for A+lnrows:T+lnrows
>
>
>Thanks...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform