Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Importing a worksheet form an Excel workbook
Message
De
09/09/1998 11:54:25
 
 
À
09/09/1998 11:26:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00134561
Message ID:
00134580
Vues:
15
Tom ---

Try the following (it may need some tweaking)
oExcel=CREATEOBJECT("Excel.Application")
oExcel.Workbooks.Open("XLSFileName.XLS")
FOR nCounter = 1 TO oExcel.Worksheets.Count
   DIME cWorkSheets(nCounter)  &&& Dynamic resizing of array is OK
   cWorkSheets(nCounter) = oExcel.Worksheets(nCounter).Name
ENDFOR
>Does anyone know of a method that can determine from VFP the number and/or name of the wooksheets in an excel work book. I woluld like to allow the users to select the actual worksheet prior to import instead of requiring all data be contained on sheet1. Thanks!
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform