LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Access Excel Cell by Name

Has anybody accessed Excel cells by name rather than cell numbers? Similar to bookmarks in word.

 

I ahave created a data sheet template in excel. I fill in this template from xml data generated during a test run. I would like to use names as it can be more descriptive than cell numbers. 

John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 1 of 3
(2,494 Views)

I think you may be looking for Range("C2")

 

As to formatting information, this is available through various properties of the Excel object model.

See http://msdn.microsoft.com/en-us/library/ff197454.aspx for more information.

The Range type (as opposed to the Range indexed property referenced above) also exposes a Name property, which you can set in code:

 

worksheet.get_Range("C2").Name = "fdafdfs"
worksheet.get_Range("fdafdfs").Select();

 

 

Kudos are welcome 😉 marked solutions are awesome!
Message 2 of 3
(2,455 Views)

Thank you Hector!

John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 3 of 3
(2,437 Views)