I am writing an automation program to collect test data and write the data to an excel file.
The excel file has several worksheets and now I can only write data to one sheet. Can anyone please let me know how to activate another worksheet and write data into it? Thank you very much.
You need to access the "Sheets" property of the workbook object, and then use the "Item" method to select a specific worksheet. MSDN contains documentation on the Excel automation objects.