mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-02-26 17:11:20 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<p>这个对象只能用于实例化自动化对象,它没有任何成员对象.</p>
|
||||
<h2 id="语法">语法 </h2>
|
||||
<pre><code>let newObj = new ActiveXObject(<em>servername, </em><em>typename</em>[, <em>location</em>])
|
||||
</code></pre>
|
||||
</code></code></pre>
|
||||
<h3 id="参数">参数</h3>
|
||||
<dl>
|
||||
<dt><code>servername</code></dt>
|
||||
@@ -40,11 +40,11 @@
|
||||
</div>
|
||||
<p>To identify members of an automation object that you can use in your code, you may need to use a COM object browser, such as the <a class="external" href="http://msdn.microsoft.com/library/d0kh9f4c.aspx" rel="noopener">OLE/COM Object Viewer</a>, if no reference documentation is available for the Automation object.</p>
|
||||
<p>To create an Automation object, assign the new <code>ActiveXObject</code> to an object variable:</p>
|
||||
<pre class="brush: js">var ExcelApp = new ActiveXObject("Excel.Application");
|
||||
<pre><code class="language-javascript">var ExcelApp = new ActiveXObject("Excel.Application");
|
||||
var ExcelSheet = new ActiveXObject("Excel.Sheet");
|
||||
</pre>
|
||||
</code></pre>
|
||||
<p>This code starts the application creating the object (in this case, a Microsoft Excel worksheet). Once an object is created, you refer to it in code using the object variable you defined. In the following example, you access properties and methods of the new object using the object variable <code>ExcelSheet</code> and other Excel objects, including the application object and the <code>ActiveSheet.Cells</code> collection.</p>
|
||||
<pre class="brush: js">// Make Excel visible through the Application object.
|
||||
<pre><code class="language-javascript">// Make Excel visible through the Application object.
|
||||
ExcelSheet.Application.Visible = true;
|
||||
// Place some text in the first cell of the sheet.
|
||||
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";
|
||||
@@ -52,7 +52,7 @@ ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";
|
||||
ExcelSheet.SaveAs("C:\\TEST.XLS");
|
||||
// Close Excel with the Quit method on the Application object.
|
||||
ExcelSheet.Application.Quit();
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="Requirements">Requirements</h2>
|
||||
<p>Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Not supported in Windows 8.x Store apps.</p>
|
||||
<div class="note">
|
||||
|
||||
Reference in New Issue
Block a user