LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to creat a worksheet of new name in LabWINDOWS,how can i do?

1.I want to change the name of existed worksheet
2.I want to creat a worksheet of setting name
Should I use which function?
0 Kudos
Message 1 of 4
(3,322 Views)
I'm not sure if you're talking about Excel or something else, but if you are referring to Excel, you can do this using the functions that come in the Excel ActiveX Controller. I would load this controller by going to Instrument >> Load, and browse to \toolslib\activex\excel. There are a couple of .fp there already (for Excel 2000) that you may use. If you want it for another version (XP), then you would have to create a new ActiveX Controller using the ActiveX Controller Wizard. It is a fairly simple process. Go to Tools>>Create ActiveX Automation Controller and browse the server's exposed objects to create a LabWindows/CVI instrument driver (a set of C functions) that wrap the methods or properties of the object. By calling the functions in the generate
d instrument driver from within a LabWindows/CVI program, you can invoke the methods and set or get the properties of the server objects. Hope this helps!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 4
(3,322 Views)
Sorry,I think I didn't put my meaning clear.I am talking about Excel.I want find appropriate function in excel2000.fp that it can change the name of existing worksheet or I can creat one worksheet by any name,for example Analog,Red,etc.,but not Sheet1,Sheet2...thank you.
0 Kudos
Message 3 of 4
(3,322 Views)
I believe you can get access to this property by calling Excel_GetProperty and Excel_SetProperty, which are a part of the Excel Instrument Driver. Using these functions, you specify the _Worksheet >> Name property and then enter the string name you want in Value.

Jeremy L.
National Instrumetns
Jeremy L.
National Instruments
0 Kudos
Message 4 of 4
(3,322 Views)