LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel: Workbook Doesn't Have (Get) Range Method?

Hi,
 
It's possible to get a Range from an Excel._Application refnum (and from an Excel._Worksheet) but not from an Excel._Workbook.  The application one is really for the active sheet in the active workbook.  I'd really like to be able to refer to a range anywhere in a workbook like you can with the Office Web Components.  Isn't there a similar thing for Excel._Workbook?
 
Thanks,
Albert
 
LabVIEW 8.2.1
0 Kudos
Message 1 of 9
(4,589 Views)
Hi Albert,
in the Workbook is no range, but you can select a sheet there and in the sheet you have the property range. What do you try to do? Can you explain a little bit more in detail? For some examples with LabView and Excel you can see the Excel thread.

Mike

Message Edited by MikeS81 on 06-12-2008 08:37 PM
0 Kudos
Message 2 of 9
(4,581 Views)

Hi,

I'd like to be able to refer to a named range in a workbook without worrying about which sheet it's on like in the Office Web Components.

Thanks,
Albert

0 Kudos
Message 3 of 9
(4,578 Views)
Hi Albert,

You are right in saying that only Excel._Application and Excel._Worksheet have the ability to set the range. I am not sure what you mean that you want to set a range in a workbook? Range normally refers to the range of cells within a particular worksheet.
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 4 of 9
(4,545 Views)
Hi,

I guess I should say that I'm using named cells and they are workbook-specific in the Office Web Components spreadsheet and also in Excel and I wish they were in Excel._Workbook.  In the Office Web Components Spreadsheet Range method you can supply a named cell that is anywhere in the workbook.  In Excel under Insert | Name | Define the dialog actually says "Names in Workbook".

Albert
0 Kudos
Message 5 of 9
(4,529 Views)
The Office Web Components are, of course, a different beast. I'm not sure if there's a way to access these components from LabVIEW, as I don't have them installed. As far as the "regular" ActiveX interface I tried using named ranges, but always got an error each time I tried to use a named range. Named ranges seem to work in VBA, though. I was unable to find any documentation that talks about this specific ActiveX element other than the regular syntax. Maybe somebody else knows a way around it, but I couldn't come up with one, and I tried a number of things.
0 Kudos
Message 6 of 9
(4,511 Views)

Hi,

The Office Web Components are accessible from LabVIEW and I do a lot with them.

I have named cells working.  Here's an example that I changed from someone else's.  Is this what you consider the "regular" ActiveX interface?

Albert

0 Kudos
Message 7 of 9
(4,478 Views)
Hi Albert,
yes, for me this is the ActiveX interface.
Mike


Message Edited by MikeS81 on 06-16-2008 12:46 PM
0 Kudos
Message 8 of 9
(4,474 Views)
Albert, for what it's worth, the "regular" ActiveX interface that I was referring to was the direct Excel ActiveX interface, which is what is used in all the NI examples, and all the code over in the Excel thread.
Message 9 of 9
(4,459 Views)