jscript之Read an Excel Spreadsheet

时间:2007-06-13    点击:211   
Description

Demonstration script that reads the values stored in a spreadsheet 
named C:\Scripts\New_users.xls. 
Script Code
复制代码 代码如下:

Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open _
    ("C:\Scripts\New_users.xls")

intRow = 2

Do Until objExcel.Cells(intRow,1).Value = ""
    Wscript.Echo "CN: " & objExcel.Cells(intRow, 1).Value
    Wscript.Echo "sAMAccountName: " & objExcel.Cells(intRow, 2).Value
    Wscript.Echo "GivenName: " & objExcel.Cells(intRow, 3).Value
    Wscript.Echo "LastName: " & objExcel.Cells(intRow, 4).Value
    intRow = intRow + 1
Loop

objExcel.Quit



Add Formatted Text to a Word Document
Add a Table to a Word Document
Add a Picture to a Microsoft Word Document
Add a Formatted Table to a Word Document
jscript之List Excel Color Values
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved