Can anybody out there help me with a script to add entries to an excel document. I have seen scripts that write to individual cells thats values are specified in the script such as:
Dim xl
set xl = wscript.createobject("excel.application")
xl.visible = true
xl.workbooks.add()
xl.Cells(1,1).Value = Value1
xl.Cells(1,2).Value = Value2
xl.Cells(1,3).Value = Value3
but I am looking to write a script that adds entires to 1 row of 4 columns in an exisitng table everytime it is run. I have been using the following code in MS Word in the meantime which just uses the pre defined variables to add a line to the existing document:
Dim wrd
set wrd = wscript.createobject("word.application")
'wrd.visible = true
wrd.documents.open "c:\newusers\Newusers.doc"
wrd.Selection.TypeText vbcrlf & strUser & " - " & strUsrNm & " & " Created: " & Date & " " & Time
wrd.activedocument.Close
wrd.application.quit
But the entires would be much better referenced in a spreadsheet. I have a feeling that the excel solution won't be as simple as the word version is at the moment! Any help would be appreciated
Dim xl
set xl = wscript.createobject("excel.application")
xl.visible = true
xl.workbooks.add()
xl.Cells(1,1).Value = Value1
xl.Cells(1,2).Value = Value2
xl.Cells(1,3).Value = Value3
but I am looking to write a script that adds entires to 1 row of 4 columns in an exisitng table everytime it is run. I have been using the following code in MS Word in the meantime which just uses the pre defined variables to add a line to the existing document:
Dim wrd
set wrd = wscript.createobject("word.application")
'wrd.visible = true
wrd.documents.open "c:\newusers\Newusers.doc"
wrd.Selection.TypeText vbcrlf & strUser & " - " & strUsrNm & " & " Created: " & Date & " " & Time
wrd.activedocument.Close
wrd.application.quit
But the entires would be much better referenced in a spreadsheet. I have a feeling that the excel solution won't be as simple as the word version is at the moment! Any help would be appreciated