1.

Solve : VB Script help?

Answer» HELLO,

If we want to enter some data in a text file using VBScript we use:

with objectname

.writeline "abcd"
.writeline "efgh"


but what if we want to MAKE entries in database, say an excel sheeet?

what is the syntax for that?

Please help.

:)Thankyou.Excel spreadsheets can be ACCESSED EITHER through the Excel object (see snippet) or with an ADO connection.

Code: [Select]Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Add()
xlApp.Visible = True
xlApp.Cells(1, 1).Value = "Test value"
xlBook.SaveAs "c:\scripts\foobar.xls"
xlApp.Quit

Where is the data coming from? Each cell: cells(1,1) is addressed with row, column coordinates. By using variables for the coordinates, it should be easy enough to READ a file and place the data in the spreadsheet.



Discussion

No Comment Found