MaFeuilleXLS est un objet Automation dynamique
sFichierXLS est une chaîne = "c:\test.xls"
// Instance de Excel existante ?
SI ObjetActif("Excel.Application") <> Null ALORS
// Récupération de l'instance de Excel existante
MaFeuilleXLS = ObjetActif("Excel.Application")
SINON
// Allocation de l'objet automation "MaFeuilleXLS"
MaFeuilleXLS = allouer un objet Automation "Excel.Application"
FIN
// Excel n'st pas visible si vous voulez le rendre visible
// changez a valeur à vrai
MaFeuilleXLS>>Visible = Vrai
MaFeuilleXLS>>Workbooks>>Open( sFichierXLS ) //Ici on ouvre la feuille
// Ouverture d'un classeur d'Excel
//Info(MaFeuilleXLS>>ActivePrinter)
//MaFeuilleXLS>>Range("A1:P49")>>Select
Info( MaFeuilleXLS>>ActivePrinter)
MaFeuilleXLS>>ActivePrinter = "PDFCreator sur Ne00:"
Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=19&topic_id=6220&post_id=24782