jscript之Read an Excel Spreadsheet_Javascript教程-查字典教程网
jscript之Read an Excel Spreadsheet
jscript之Read an Excel Spreadsheet
发布时间:2016-12-30 来源:查字典编辑
摘要:DescriptionDemonstrationscriptthatreadsthevaluesstoredinaspreadsheetna...

Description

Demonstrationscriptthatreadsthevaluesstoredinaspreadsheet

namedC:ScriptsNew_users.xls.

ScriptCode

复制代码 代码如下:

SetobjExcel=CreateObject("Excel.Application")

SetobjWorkbook=objExcel.Workbooks.Open_

("C:ScriptsNew_users.xls")

intRow=2

DoUntilobjExcel.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

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新Javascript教程学习
    热门Javascript教程学习
    编程开发子分类