jscript之Read an Excel Spreadsheet
更新時(shí)間: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)文章
JavaScript中關(guān)于Object.create()的用法
這篇文章主要介紹了JavaScript中關(guān)于Object.create()的用法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-02-02
ES6新特性:使用export和import實(shí)現(xiàn)模塊化詳解
本篇文章主要介紹了ES6新特性:使用export和import實(shí)現(xiàn)模塊化詳解,具有一定的參考價(jià)值,有興趣的可以了解一下2017-07-07
javascript與webservice的通信實(shí)現(xiàn)代碼
關(guān)于javascript與webservice的通信,從理論上來(lái)說(shuō)實(shí)現(xiàn)應(yīng)該不難,主要是將服務(wù)器端的xml數(shù)據(jù)進(jìn)行一個(gè)簡(jiǎn)單的處理然后以一種適當(dāng)?shù)男问秸宫F(xiàn)成來(lái)。2010-12-12
JS實(shí)現(xiàn)文字鏈接感應(yīng)鼠標(biāo)淡入淡出改變顏色的方法
這篇文章主要介紹了JS實(shí)現(xiàn)文字鏈接感應(yīng)鼠標(biāo)淡入淡出改變顏色的方法,實(shí)例分析了javascript操作鼠標(biāo)事件及css樣式的技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-02-02
js實(shí)現(xiàn)的修改div里img標(biāo)簽的src屬性
js實(shí)現(xiàn)的修改div里img標(biāo)簽的src屬性...2007-09-09
js代碼實(shí)現(xiàn)點(diǎn)擊按鈕出現(xiàn)60秒倒計(jì)時(shí)
這篇文章主要為大家詳細(xì)介紹了js代碼實(shí)現(xiàn)點(diǎn)擊按鈕出現(xiàn)60秒倒計(jì)時(shí),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2015-12-12

