Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Automation
Message
 
 
À
24/02/2011 07:37:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01501585
Message ID:
01501586
Vues:
68
Excel doesn't know anything about VFP current directory and has its own current directory. You have to provide full file name including path. You can use FULLPATH() to get full file name
lcXlsName = FULLPATH("cards.xls")
loWorkbook = loExcel.workbooks.open(lcXlsName)
>how can open the excel sheet from a specific directory.
>while I set the default to the specific path but still and I got error not finding the location
>
>if it is like this I got an error of location
>loExcel = CREATEOBJECT("Excel.Application") && Create the Excel object
>loWorkbook = loExcel.workbooks.open("cards.xls")
>loExcel.Visible = .T. && display Excel
>
>however when I add the path as the following I do not get error. while I need to open from the default original path
>
>loExcel = CREATEOBJECT("Excel.Application") && Create the Excel object
>loWorkbook = loExcel.workbooks.open("c:\temp\cards.xls")
>loExcel.Visible = .T. && display Excel
>
>Thank You
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform