<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: чтение и редактирование уже открытого документа Excel]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=16682</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16682&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: чтение и редактирование уже открытого документа Excel».]]></description>
		<lastBuildDate>Thu, 28 Oct 2021 18:46:21 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: чтение и редактирование уже открытого документа Excel]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150293#p150293</link>
			<description><![CDATA[<p><strong>inseption86</strong> аа, тут я кое-как уже разобрался что да как. Благо случайно нашел на ютубе видео подходящее, хоть и на английском. Да и <strong>teadrinker</strong> показал другой вариант решения. Но все равно спасибо! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (CyberGudini)]]></author>
			<pubDate>Thu, 28 Oct 2021 18:46:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150293#p150293</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: чтение и редактирование уже открытого документа Excel]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150290#p150290</link>
			<description><![CDATA[<p><strong>CyberGudini</strong></p><div class="codebox"><pre><code>

book_name := &quot;1.xlsx&quot;

try
{   xl := ComObjActive(&quot;Excel.Application&quot;) 
	book := xl.Workbooks(book_name)

	MyVar := book.worksheets(1).Range(&quot;C4&quot;).Value
	MsgBox % MyVar
	book.worksheets(1).Range(&quot;C5&quot;).Value := &quot;55555&quot;
	MyVar := book.worksheets(1).Range(&quot;C5&quot;).Value
	MsgBox  % MyVar

	book.close(true)
	xl.quit
}
catch
	MsgBox, 262192, , % &quot;Книга &quot;&quot;&quot; book_name &quot;&quot;&quot; не найдена!!&quot;
ExitApp

</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (inseption86)]]></author>
			<pubDate>Thu, 28 Oct 2021 18:08:47 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150290#p150290</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: чтение и редактирование уже открытого документа Excel]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150221#p150221</link>
			<description><![CDATA[<p>Смотрите пример <a href="https://forum.script-coding.com/viewtopic.php?pid=150220#p150220">отсюда</a>.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 26 Oct 2021 21:18:31 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150221#p150221</guid>
		</item>
		<item>
			<title><![CDATA[AHK: чтение и редактирование уже открытого документа Excel]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150219#p150219</link>
			<description><![CDATA[<p>Я нашел код, который может лишь открыть пока еще неоткрытый документ и позволяет читать и редактировать его:<br /></p><div class="codebox"><pre><code>
Path := &quot;D:\Тест\jou.xlsx&quot;
ex := ComObjCreate(&quot;Excel.Application&quot;)
ex.Workbooks.Open(Path)
ex.visible := True

ex:= ComObjActive(&quot;Excel.Application&quot;)
MyVar := ex.Range(&quot;C4&quot;).Value
MsgBox, %MyVar%
ex.Range(&quot;C5&quot;).Value := &quot;55555&quot;
MyVar := ex.Range(&quot;C5&quot;).Value
MsgBox, %MyVar%
</code></pre></div><p>Однако, если я запускаю код при уже открытом документе, он открывает его копию в режиме [только для чтения]. И с каждым новым запуском он открывает копии и так до бесконечности.</p><p>А как сделать, чтобы он не открывал, а например читал и изменял уже открытый документ?<br />вместо </p><div class="codebox"><pre><code>ex.Workbooks.Open(Path)</code></pre></div><p> сделать Что-то вроде: </p><div class="codebox"><pre><code>ex.Workbooks.Read(Path)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (CyberGudini)]]></author>
			<pubDate>Tue, 26 Oct 2021 21:11:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150219#p150219</guid>
		</item>
	</channel>
</rss>
