Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to open an excel file in VFP
Message
 
 
À
27/01/2003 19:43:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00746047
Message ID:
00746080
Vues:
20
Jeana,

This will open up a spreadsheet:
oExcel = createobject( "excel.application" )
oExcel.Visible = .t.
oExcel.Workbooks.Open( "TheSpreadsheet.xls" )
This will bring it to the foreground;
DECLARE INTEGER SetForegroundWindow IN WIN32API INTEGER
SetForegroundWindow( oExcel.Hwnd )
The user can do what ever they want inside Excel.

If they shutdown Excel then you can test it from inside VFP:
if ( type( "oExcel.ActiveWindow" ) = "U" )
Then you can just get rid of your object with:
oExcel = .null.
>1. Open an excel worksheet within VFP ( How To ???)
>2. Let the user update excel work sheet
>3. If user clicks “close” in excel , close the excel sheet in prg. (How To ??)
>4. Get on with my program.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform