2
Contributors
2
Replies
4
Views
4 Years
Discussion Span
Last Post by joshl_1995
0

It's been a while since I did this from vbScript but this works. Save this code in sampleapp.vbs and create a test widget.xls file to play with.

set xls = CreateObject("Excel.Application")
xls.WorkBooks.Open "d:\script\dani\widget.xls"

With xls.WorkBooks(1).WorkSheets(1)
    .Cells(2,1) = "Malcolm"
    .Cells(2,2) = "Delarge"
    .Cells(2,3) = 855321
End With

xls.WorkBooks(1).SaveAs "d:\script\dani\widget2.xls"
xls.Quit

quick note - if you get errors while playing you may end up with one or more Excel.exe tasks running. Just use task manager to kill them. Personally, I use pskill.exe (free sysinternals suite app)

Edited by Reverend Jim

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.