<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.fr.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>3 May 2020 14:06:35 Z</lastBuildDate><pubDate>30 Apr 2020 10:01:58 Z</pubDate><description>Bonjour,&#13;
&#13;
Je suis confronté à un problème parfaitement reproductible.&#13;
&#13;
Je veux manipuler un fichier Excel avec Automation et que l'utilisateur voit le résultat.&#13;
&#13;
Donc j'ai fait dans un premier temps:&#13;
[code:wl]&#13;
v_obj_xls est un objet automation "Excel.Application"&#13;
v_obj_xls&gt;&gt;Visible = vrai&#13;
//diverses manipulations&#13;
[/code]&#13;
Le problème avec çà est que Excel reste derrière la fenêtre de mon application. Il faut que l'utilisateur l'active.&#13;
&#13;
Du coup, j'ai fait plutôt ceci:&#13;
&#13;
[code:wl]&#13;
LanceAppli(....excel.exe)&#13;
//....Excel se lance en avant-plan : très bien&#13;
v_obj_xls est un objet automation dynamique&#13;
&#13;
//attente 30 secondes maxi jusqu'à ce que Excel "réagisse"&#13;
ChronoDebut()&#13;
BOUCLE&#13;
	v_obj_xls = ObjetActif("Excel.Application")&#13;
	SI v_obj_xls &lt;&gt; null&#13;
		SORTIR&#13;
	SINON&#13;
		v_dur = ChronoValeur()&#13;
		SI v_dur..EnSecondes &gt; 30&#13;
			Erreur("Excel inaccessible")&#13;
			RETOUR&#13;
		FIN&#13;
	FIN&#13;
FIN&#13;
&#13;
//je continue mon traitement avec Excel...&#13;
[/code]&#13;
&#13;
Le problème, c'est que ObjetActif renvoie toujours null. Il faut que je remette mon appli avant-plan, quitte ensuite à remettre Excel en avant plan à nouveau et là ObjetActif fonctionne.&#13;
&#13;
Est-ce que certains ont déjà rencontré ce problème ? Avec Word, on n'a pas ce problème.</description><ttl>30</ttl><generator>WEBDEV</generator><language>fr_FR</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel/read.awp</link><title>ObjetActif avec Excel</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>TheCout</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239248/read.awp</comments><pubDate>3 May 2020 14:06:35 Z</pubDate><description>Effectivement, c'est la méthode que j'avais retenue entre temps.&#13;
&#13;
J'hésitais à le faire car je me souvenais qu'il y a maintena…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239248/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239248/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel/read.awp">ObjetActif avec Excel</source><title>Re: ObjetActif avec Excel</title></item><item><author>Philippe Pasquali</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239232/read.awp</comments><pubDate>2 May 2020 16:00:47 Z</pubDate><description>Bonjour&#13;
Je me doutais bien qu'il y avait plus simple...&#13;
Je ne connaissais pas le xl&gt;&gt;hwnd qui permet effectivement de simplifi…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239232/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239232/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel/read.awp">ObjetActif avec Excel</source><title>Re: ObjetActif avec Excel</title></item><item><author>Jurassic Pork</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239211/read.awp</comments><pubDate>2 May 2020 00:09:07 Z</pubDate><description>hello,&#13;
en plus simple  avec un classeur déjà ouvert par OLE (ne pas lancer excel par un LanceAppli)  :&#13;
[code:wl]&#13;
excel est un…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239211/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239211/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel/read.awp">ObjetActif avec Excel</source><title>Re: ObjetActif avec Excel</title></item><item><author>Philippe Pasquali</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239206/read.awp</comments><pubDate>1 May 2020 20:19:28 Z</pubDate><description>Bonjour&#13;
J'ai trouvé cette méthode mais c'est un petit lourd...Il y a surement mieux&#13;
&#13;
[code:wl]&#13;
WindowsFound est un booléen&#13;
…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239206/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel-239206/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/239149-objetactif-avec-excel/read.awp">ObjetActif avec Excel</source><title>Re: ObjetActif avec Excel</title></item></channel></rss>
