Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to load a specific Excel file
Message
 
 
À
10/05/2005 18:19:22
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01012644
Message ID:
01012648
Vues:
29
This message has been marked as the solution to the initial question of the thread.
>Hello,
>
>I'm trying to open a specific Excel file once I have started Excel (oleApp=Createobject("Excel.Application")).
>
>I attempted to record the macro in Excel which gave me...
>Workbooks.Open FileName:= _
>"C:\foldername\filename.xls"
>
>As I've found working with Excel, it's probably some little part of the macro that isn't correct if copied into FoxPro code. I just haven't hit on what that is on my own.
>
>Any help is greatly appreciated.

Hi Martha,
lcXlsFile = "C:\foldername\filename.xls"
oExcel = CreateObject("Excel.Application")
oWorkbook = oExcel.Workbooks.Open(lcXlsFile)
oExcel.Visible = .T.
oSheet = oWorkbook.ActiveSheet
* 3rd row, 2nd column
? oSheet.Cells(3,2).Value
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform