我是靠谱客的博主 火星上悟空,这篇文章主要介绍jscript之Read an Excel Spreadsheet,现在分享给大家,希望可以做个参考。

Description

Demonstration script that reads the values stored in a spreadsheet 
named C:ScriptsNew_users.xls. 
Script Code

复制代码 代码如下:

Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open _
    ("C:ScriptsNew_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



最后

以上就是火星上悟空最近收集整理的关于jscript之Read an Excel Spreadsheet的全部内容,更多相关jscript之Read内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(251)

评论列表共有 0 条评论

立即
投稿
返回
顶部