I want to open an existing Excel-file from Labview with ActiveX. I have used the Example "write table XL.vi" I changed the code that I can open the existing file but I am unable to select a different sheet in Excel.There is always the first sheet active and I cannot change this. Can anybody help me?
robert
Sent via Deja.com http://www.deja.com/ Before you buy.
wrote in message news:8q4e0a$hsa$1@nnrp1.deja.com... > I want to open an existing Excel-file from Labview with ActiveX. > I have used the Example "write table XL.vi" > I changed the code that I can open the existing file but I am unable to > select a different sheet in Excel.There is always the first sheet active > and I cannot change this. > Can anybody help me?
The workbook object has a "Sheets" property that returns a collection of all the sheets in the active workbook. Use the "Item" method on this collection to select the sheet you want- if necessary by cycling through all the elements (use the "Count" property to find how many objects there are) and using the "Name" property to get the name of the worksheet for comparison with the one you're looking for. Remember that everything is case sensitive.