jscript之Read an Excel Spreadsheet
更新時間:2007年06月13日 00:00:00 作者:
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
Demonstration script that reads the values stored in a spreadsheet
named C:\Scripts\New_users.xls.
Script Code
復(fù)制代碼 代碼如下:
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
相關(guān)文章
詳解解決小程序中webview頁面多層history返回問題
這篇文章主要介紹了詳解解決小程序中webview頁面多層history返回問題,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-08-08javascript之典型高階函數(shù)應(yīng)用介紹
這幾個方法均為javascript 1.6 數(shù)組新增的方法。是很典型的functional 函數(shù),當(dāng)然也非常實用。下面是functional的定義并不來自javascript2013-01-01