<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBScript: работаем с OpenOffice.org через COM]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=1266</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=1266&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBScript: работаем с OpenOffice.org через COM».]]></description>
		<lastBuildDate>Fri, 18 Apr 2008 06:17:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBScript: работаем с OpenOffice.org через COM]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=10516#p10516</link>
			<description><![CDATA[<p>Простейший пример вывода во Writer.<br /></p><div class="codebox"><pre><code>Set objServiceManager = CreateObject(&quot;com.sun.star.ServiceManager&quot;)
Set Stardesktop = objServiceManager.createInstance(&quot;com.sun.star.frame.Desktop&quot;)
Set doc = Stardesktop.loadComponentFromURL(&quot;private:factory/swriter&quot;, &quot;_blank&quot;, 0, Array())
For i=0 To 10
    doc.Text.End.String = i &amp; &quot;: Пример вывода&quot; &amp; vbCr
Next</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Fri, 18 Apr 2008 06:17:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=10516#p10516</guid>
		</item>
		<item>
			<title><![CDATA[VBScript: работаем с OpenOffice.org через COM]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=9799#p9799</link>
			<description><![CDATA[<p>Простейший пример работы с OpenOffice.org через COM. Скрипт запускает Calc, заполняет лист некоторыми значениями, а затем сохраняет книгу в формате MS Excel.<br />Источник - <a href="http://www.kb.mista.ru/article.php?id=180">Интеграция OpenOffice Calc с 1С 7.7</a>.<br /></p><div class="codebox"><pre><code>Set ServiceManager = CreateObject(&quot;com.sun.star.ServiceManager&quot;)
Set Desktop = ServiceManager.createInstance(&quot;com.sun.star.frame.Desktop&quot;)
arr = Array()
Set Document = Desktop.LoadComponentFromURL(&quot;private:factory/scalc&quot;, &quot;_blank&quot;, 0, arr)
Set Sheets = Document.getSheets()
Set Sheet = Sheets.getByIndex(0)
For k = 0 To 10
    Sheet.getCellByPosition(0, k).Value = k
Next

Set SaveParam = ServiceManager.Bridge_GetStruct(&quot;com.sun.star.beans.PropertyValue&quot;)
SaveParam.Name = &quot;FilterName&quot;
SaveParam.Value = &quot;MS Excel 97&quot;
ReDim arr(0)
Set arr(0) = SaveParam
Document.storeToURL &quot;file:///c:/Temp/test.xls&quot;, arr</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Sun, 16 Mar 2008 08:07:09 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=9799#p9799</guid>
		</item>
	</channel>
</rss>
