<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBS: Вставка данный в открытый файл Excel]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=11116</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11116&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBS: Вставка данный в открытый файл Excel».]]></description>
		<lastBuildDate>Thu, 03 Dec 2015 10:10:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBS: Вставка данный в открытый файл Excel]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=99492#p99492</link>
			<description><![CDATA[<p><strong>Anr1975</strong></p><div class="codebox"><pre><code>&#039; Пример для сервера сценариев Windows
&#039;
&#039; ------------------------------------------------------------------------
&#039;                     (C) Корпорация Microsoft, 1996-1998
&#039;
&#039; Вы имеете право, не требующее дополнительных лицензионных платежей, 
&#039; на использование, изменение, воспроизведение и распространение файлов
&#039; примеров (и любой измененной версии) любым способом, учитывая, что
&#039; Корпорация Microsoft не предоставляет гарантий и обязательств, 
&#039; а также не несет ответственности за любой из файлов примеров
&#039; ------------------------------------------------------------------------
	
&#039; Пример вывода свойств сервера сценариев Windows в Microsoft Excel.

L_Welcome_MsgBox_Message_Text    = &quot;Пример вывода свойств сервера сценариев Windows в Microsoft Excel.&quot;
L_Welcome_MsgBox_Title_Text      = &quot;Пример сервера сценариев Windows&quot;
Call Welcome()
    

&#039; ********************************************************************************
&#039; *
&#039; * Пример Excel
&#039; *
Dim objXL
Set objXL = WScript.CreateObject(&quot;Excel.Application&quot;)

objXL.Visible = TRUE

objXL.WorkBooks.Add

objXL.Columns(1).ColumnWidth = 20
objXL.Columns(2).ColumnWidth = 30
objXL.Columns(3).ColumnWidth = 40

objXL.Cells(1, 1).Value = &quot;Свойство&quot;
objXL.Cells(1, 2).Value = &quot;Значение&quot;
objXL.Cells(1, 3).Value = &quot;Описание&quot;

objXL.Range(&quot;A1:C1&quot;).Select
objXL.Selection.Font.Bold = True
objXL.Selection.Interior.ColorIndex = 1
objXL.Selection.Interior.Pattern = 1 &#039;xlSolid
objXL.Selection.Font.ColorIndex = 2

objXL.Columns(&quot;B:B&quot;).Select
objXL.Selection.HorizontalAlignment = &amp;hFFFFEFDD &#039; xlLeft

Dim intIndex
intIndex = 2

Sub Show(strName, strValue, strDesc)
    objXL.Cells(intIndex, 1).Value = strName
    objXL.Cells(intIndex, 2).Value = strValue
    objXL.Cells(intIndex, 3).Value = strDesc
    intIndex = intIndex + 1
    objXL.Cells(intIndex, 1).Select
End Sub

&#039;
&#039; Вывод свойств WScript
&#039;
Call Show(&quot;Name&quot;,            WScript.Name,           &quot;Имя приложения&quot;)
Call Show(&quot;Version&quot;,         WScript.Version,        &quot;Версия приложения&quot;)
Call Show(&quot;FullName&quot;,        WScript.FullName,       &quot;Контекст приложения: полное имя&quot;)
Call Show(&quot;Path&quot;,            WScript.Path,           &quot;Контекст приложения: только путь&quot;)
Call Show(&quot;Interactive&quot;,     WScript.Interactive,    &quot;Состояние режима взаимодействия&quot;)


&#039;
&#039; Вывод аргументов командной строки.
&#039;
Dim colArgs
Set colArgs = WScript.Arguments
Call Show(&quot;Arguments.Count&quot;, colArgs.Count, &quot;Число аргументов командной строки&quot;)

For i = 0 to colArgs.Count - 1
    objXL.Cells(intIndex, 1).Value = &quot;Arguments(&quot; &amp; i &amp; &quot;)&quot;
    objXL.Cells(intIndex, 2).Value = colArgs(i)
    intIndex = intIndex + 1
    objXL.Cells(intIndex, 1).Select
Next



&#039; ********************************************************************************
&#039; *
&#039; * Приветствие
&#039; *
Sub Welcome()
    Dim intDoIt

    intDoIt =  MsgBox(L_Welcome_MsgBox_Message_Text, _
                      vbOKCancel + vbInformation,    _
                      L_Welcome_MsgBox_Title_Text )
    If intDoIt = vbCancel Then
        WScript.Quit
    End If
End Sub

</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (mozers)]]></author>
			<pubDate>Thu, 03 Dec 2015 10:10:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=99492#p99492</guid>
		</item>
		<item>
			<title><![CDATA[VBS: Вставка данный в открытый файл Excel]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=99467#p99467</link>
			<description><![CDATA[<p>Подскажите, как вставить данные в открытый файл Excel&nbsp; на указанный лист с помощью&nbsp; VBScript?</p>]]></description>
			<author><![CDATA[null@example.com (Anr1975)]]></author>
			<pubDate>Wed, 02 Dec 2015 12:37:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=99467#p99467</guid>
		</item>
	</channel>
</rss>
