Subscribe to Windows IT Pro
June 09, 2003 12:00 AM

Using Excel to Parse the Input File

Windows IT Pro
InstantDoc ID #39118
Rating: (0)

The primary advantage of using a comma-separated value (CSV) file to list the Active Directory (AD) object attributes and values you want to update is that most data-exporting tools can generate CSV files. Furthermore, you can easily list the attribute names in the first row, designate that row as a header row, then place the respective values in subsequent rows in an easy-to-read tabular format. The biggest problem with CSV files is parsing out the various fields. By definition, the CSV format uses commas to separate each field. Therefore, any field that contains a comma presents a problem to a script attempting to parse input directly from a CSV file.

Microsoft Excel does a great job of overcoming this problem. Instead of using Windows Shell Scripting or VBScript to manipulate strings, the script can simply use the Excel Application object to open a CSV file and parse the data that it contains. Or, you can use an Excel spreadsheet as your input file. You can also import data from databases or any other file format that Excel supports.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.