LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX Office Web Components: Reading an Array of Cells

Hi,

 

I can't seem to read an array of cells from an ActiveX Office Web Components spreadsheet the way I would think it should work.  Can anyone tell me how to do this?  I can get the information by playing some tricks but I would think I should be able to get it a better way.

 

In my example, the code in the gray sequence has the code that I would think would be the way to do it but the data I'm reading is offset by an amount that is the same as a named range is from A1.

 

The code in the green sequence works but it seems klunky and would only work to column Z.

 

Thanks for any help,

Albert

 

LabVIEW 2011 & 8.2.1

Download All
0 Kudos
Message 1 of 4
(2,975 Views)

Hi Albert,

 

I took a look at your code and I have two suggestions for you. I wasn't able to get your code to function because I do not have your spreadsheet control but it would be worth a shot to try it out.

 

In the grey sequence structure if your replace the second "range" invoke node for an ISpreadsheet invoke node and wire name cell string into cell one and the offset of the first range invoke node into cell two.

 

Then wire range into the range invoke node. The other suggestion is to wire the namecel string into cell one like you did in the green sequence structure. Good Luck!

Ryan
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,934 Views)

Hi,

 

I tried that but the offset node gives me an error when I do that.  I suspect it wants both Cell1 and Cell2 to be of the same type (Range or string).

 

Thanks,

Albert

0 Kudos
Message 3 of 4
(2,921 Views)

I'm not super familiar with these property nodes within the Office Web Components. That maybe the case that you have to use the same data type. What does the error say exactly? You may want to try and see what microsoft has to say about OWC and how it is used. 

Ryan
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,901 Views)