J'ai besoin de charger 2 excel, puis de copier un onglet data dans l'autre fichier.
ils doivent donc etre dans la meme session (je passe de autoit , a du VBA).
j'utilise les fonctions suivantes :
Code : Tout sélectionner
; démarrage
$vers_excel="Excel non détecté"
$path_excel="C:\Program Files (x86)\MsOffice\Office14\EXCEL.exe"
If FileExists($path_excel) Then
$vers_excel="Office2010"
Else
$path_excel="C:\Program Files (x86)\Microsoft Office 2016\Office16\EXCEL.exe"
If FileExists($path_excel) Then
$vers_excel="Office2016"
Else
If MsgBox(4,"!","Excel introuvalble ! Voulez vous continuer ?")=7 then Exit
Endif
EndIf
Code : Tout sélectionner
$path=@ScriptDir &"\excel1.xlsm"
While Not FileExists($path)
$path = Inputbox("Fichier Excel principal introuvable", "Veuillez rentrer le chemin complet",$path)
Wend
Run($path_excel & " " & $path)
Run($path_excel & " " & @TempDir &"\"& $excel2 & ".xls")
help !
Islamalice
je n'utilise (pas encore) l'include sur excel (faut d'avoir compris la différence en open et openbook)