Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing Excel Sheet
Message
De
23/09/2002 05:25:48
Ashish Patel
Hindustan Petroleum
Mumbai, Inde
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Accessing Excel Sheet
Divers
Thread ID:
00703274
Message ID:
00703274
Vues:
73
I am using the following code to access Excel File from Visual Foxpro prog which I received from UT only. Thanks for that. Since my excel file is having multiple worksheets how can I point to a particular work sheet?
--------------------------------------------------------------------------
lcXLSFile = 'c:\path\YourXls.xls'
lcRange = "b2:b500"
oExcel = createobject("excel.application")
With oExcel
.Workbooks.open(lcXLSFile)
With .ActiveWorkbook.ActiveSheet.range(lcRange)
For ix = 1 to .Rows.count
For jx = 1 to .Columns.count
? .Cells(ix,jx).Value
Endfor
Endfor
Endwith
.quit
Endwith
-----------------------------------------------------------------------------

Thanks in Advance.

Regards

Ashish Patel
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform