Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Importing a worksheet form an Excel workbook
Message
From
09/09/1998 13:20:15
 
 
To
09/09/1998 11:54:25
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00134561
Message ID:
00134634
Views:
14
John ---

Thanks! Just what I needed.
I guess it's time I shed my distaste for ms office apps and learn vb for apps.

>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!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform