Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error message
Message
De
13/06/2007 07:48:56
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01232179
Message ID:
01232526
Vues:
13
hi,
thank you very much.

>I've tried the following simple code (bellow) based on my third idea, because I don't have time right now to explore my second idea (which is presumably better):
>
>declare long ShellExecute in "shell32.dll" ;
>	long hwnd, string lpszOp, ;
>	string lpszFile, string lpszParams, ;
>    string lpszDir, long nShowCmd
>ShellExecute(0,'Open',GETFILE('xls'),'','',1)
>DECLARE Sleep IN kernel32 INTEGER dwMilliseconds
>
>Sleep(1000*30) && Hopefully half a minute would be enough to change one value
>
>TRY
>   loExcel = GETOBJECT(,'Excel.application')
>   IF VARTYPE(m.loExcel) = 'O'
>      *loExcel.Save(.t.)  - doesn't work, so users may need to also press Save button themselves
>      loExcel.Quit()
>   ENDIF
>CATCH TO loError
>    * Problem
>ENDTRY
>
>
>>hi,
>>thank you so much ,
>>i need to close myexcel sheet before import it,
>>via simple code. if it is possible
>>
>>
>>CLOSE all
>>SET DATE BRITISH
>>SET CENTURY on
>>thisform.text9.Value=GETFILE('xls')
>>
>>   declare long ShellExecute in "shell32.dll" ;
>>	long hwnd, string lpszOp, ;
>>	string lpszFile, string lpszParams, ;
>>    string lpszDir, long nShowCmd
>>ShellExecute(0,'Open',thisform.text9.Value,'','',1)
>>***************************************
>>IMPORT FROM (thisform.text9.value) TYPE xls
>>
>>thanks
>>>>>>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform