11-14-2007 11:48 AM
11-14-2007 01:17 PM
11-14-2007 03:14 PM
11-14-2007 03:40 PM - edited 11-14-2007 03:49 PM
11-14-2007 04:13 PM
I have attached a VI that uses the "Name" property of a worksheet object to change the tab name. It is a bit horrible to look at but this is automation in LabVIEW - not always pretty!
The VI does the following:
1. Open an instance of the Excel Application object and makes it visible (for some reason, if you use automation to create an instance of Excel to work with, it will be created with the visible property set to false - go figure.
2. Add a new workbook to the Workbooks collection.
3. Add a new worksheet to the new workbook's Worksheets collection.
4. Use the worksheets "Name" property to retrieve and display the created worksheet's name
5. Uses the "Name" property to rename the sheet tab.
6. Uses the "Name" property to retrieve and show the new name.
If you are doing a lot of automation of Excel, I would get a good book on programming Excel that describes the automation interface. John Walkenbach has written several good ones. (http://j-walk.com/ss/)
-cb
11-14-2007 04:23 PM
11-14-2007 04:31 PM
11-14-2007 05:10 PM
05-23-2008 03:17 AM
05-23-2008 07:25 AM
Hi I_Pant,
attached is a picture of it.
Mike