|
set objExcel = CreateObject("Excel.Application")
Set f = objExcel.Workbooks.Open ("D:\project\usercenter.xls")
Set m=objExcel.Worksheets("sheet1")
RowNo=2
For i=1 to 2
msgbox RowNo
objExcel.Cells(RowNo,3).value="'"+rootNode.childNodes(0).attributes(0).nodeValue
objExcel.Cells(RowNo,4).value=rootNode.childNodes(0).attributes(1).nodeValue
objExcel.Cells(RowNo,5).value=rootNode.childNodes(0).attributes(2).nodeValue
objExcel.Cells(RowNo,6).value="'"+rootNode.childNodes(0).attributes(3).nodeValue
objExcel.Cells(RowNo,7).value=rootNode.childNodes(0).attributes(4).nodeValue
RowNo=RowNo+1
msgbox RowNo
NEXT
我运行了以后,只写进了第二行,可是输出值现实RowNo增加了,请高手发表一下看法和解决方法 |
|