LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Back Excel Cell Defined Names

Hi

 

I need some help, we have multiple excel worksheets (separate files), each of these sheets has different amount of cells with specific defined names. For example C1 may have the defined name "input volts".

 

As the location of the these cells change per sheet as well as the types of defined names we need a VI that can return all the defined names from the specific worksheet. The operator can change the excel file and it returns all the defined names attributed to that excel file.

 

Thanks

0 Kudos
Message 1 of 7
(3,598 Views)

How do you recognise these elements? Are they always in the first row? If so, reading that row using the RGT (Report Generation Toolkit) should get you what you need, with array based processing to follow as needed.

 

The Excel "Get Data" VI should be what you need.

 

If not, more information needed!


GCentral
0 Kudos
Message 2 of 7
(3,591 Views)

No the defined cell names can be in any cells on the worksheet. This is why I need to read what is on the excel sheet before writing to those cells.

 

The sheet which I am trying to read from is a test report, as test report format and requirements change per part number I don't want to create a VI per part number, much rather have one smart VI. Reads the test report template sees what cells there are to populate  (defined names) writes only to those cells etc.

0 Kudos
Message 3 of 7
(3,589 Views)

So... You already know the list of text strings and there will only be one of each string? Or perhaps anything containing alphabetic characters is a label and numbers are values?

 

How can a computer determine the things you want to know? Just to be sure, what you want to know is the cell references for each label?


GCentral
0 Kudos
Message 4 of 7
(3,559 Views)

If you go into excel you can right click a cell and define name. If you go into name manager you can see all the cells with name managers. 

 

I want to be able to read back all the defined names from excel name manager via labview. 

0 Kudos
Message 5 of 7
(3,546 Views)

Something like this, this code will list all the defined names in your workbook and their locations.

 

Ben64

 

List Defined names.png

Message 6 of 7
(3,541 Views)

Amazing nice one

0 Kudos
Message 7 of 7
(3,536 Views)