<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: Вставка данный в открытый файл Excel]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11116&amp;type=atom" />
	<updated>2015-12-03T10:10:40Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11116</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Вставка данный в открытый файл Excel]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99492#p99492" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[mozers]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=4112</uri>
			</author>
			<updated>2015-12-03T10:10:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99492#p99492</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS: Вставка данный в открытый файл Excel]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99467#p99467" />
			<content type="html"><![CDATA[<p>Подскажите, как вставить данные в открытый файл Excel&nbsp; на указанный лист с помощью&nbsp; VBScript?</p>]]></content>
			<author>
				<name><![CDATA[Anr1975]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33520</uri>
			</author>
			<updated>2015-12-02T12:37:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99467#p99467</id>
		</entry>
</feed>
