VBScript program demonstrating how to write information to a Microsoft Excel spreadsheet. The program
binds to a user object in Active Directory and writes a few attribute values to cells in the
spreadsheet. The program includes a loop to enumerate the groups the user is a member of and writes
the group names to the spreadsheet. A few cells are formatted and the spreadsheet is saved. The name
of the spreadsheet is passed to the program as an argument. If the file name of the spreadsheet does
not include a path, the spreadsheet is assumed to be in the current directory, which is most likely
the folder the program is in. The program checks to make sure that Microsoft Excel is installed. When
the spreadsheet is saved, if the file already exists, Excel asks the user if the file should be
overwritten.
XLWrite.txt <<-- Click here to view or download the program