11-08-2010, 05:16 PM
(This post was last modified: 11-08-2010, 05:29 PM by KavitaPriyaCR.)
Hi
1. In excel sheet whenever we run the script only one value should be present with the updated value.
For this you can just say:
' here update i (loop) as you want
2. In notepad for each run of the script there should be separate line of values present (ie for example if we had run the script for 3 times there should be three lines in notepad)
3. 3rd point is not clear for me.
1. In excel sheet whenever we run the script only one value should be present with the updated value.
For this you can just say:
' here update i (loop) as you want
Code:
Set objExcel=CreateObject("Excel.Application")
Set objBook=objExcel.WorkBooks.Open(("C:\path\filename1.xls")
Set objSheet=objExcel.Sheets("SheetName1")
For j= 1 To 3
objSheet.Cells(i,j).value="value"
Next
Code:
Set fso=CreateObject("Scripting.FileSystemObject")
Set filename=fso.OpenTextFile("C:\path\filename1.txt",8,True)
'write the text here
filename.WriteLine "updating the text file"