Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grabbing a range in excel and putting it into a cursor i
Message
De
01/06/2007 09:52:09
 
 
À
01/06/2007 09:37:07
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01229777
Message ID:
01229782
Vues:
16
This message has been marked as the solution to the initial question of the thread.
>I have a VFP screen into which I want to import a range from an existing XLS sheet
>I imagine having the screen open in VFP. By prssing a button the excel sheet comes to the forground. I highlight a range let's say k144:o162 and by either copying it to the clipbord or executing an excel macro pushing the values of the range into an array and returning it into a VFP array
>
>is this possible?
>
>
>Peter

I'm almost certain it is. A little different from what you describe: Highlight a range, and then push a button on your VFP-form. I assume your Excel-session is in a property of the form:

THISFORM.oExcel

Then check the properties of THISFORM.oExcel.Selection

I don't know how they are named, but you can find out the left-upper-cell and the right-lower as properties of the object THISFORM.oExcel.Selection. After that you just do a FOR-loop in Fox to fill an array.

Sorry I have no prefab code for you, hopes this gives enough direction.

Lennert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform