LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I get an error when I try to index the 11th excel worksheet

I tried to access the 11th worksheet in an Excel Workbook. I try to access it by using  invoke method. When I do, I use an index of 11. My error code is 
-2147352 which is "Invalid Index."
 
 
0 Kudos
Message 1 of 6
(2,503 Views)
And?

To ask the obvious: how many sheets are in your Excel workbook?

When I tried it on a workbook that contained 11 sheets I got no error.
Message 2 of 6
(2,496 Views)

The problem might be that LabVIEW starts its indexing at zero, while Excel starts indexing its spreadsheets at 1.  To get your 11th worksheet, you might need to set the index in LabVIEW to 10, instead of 11.

Meghan M.

0 Kudos
Message 3 of 6
(2,471 Views)
Actually, to get the 11th sheet you have to wire an 11, not 10, to the "Index" input of the "Item" node.
Message 4 of 6
(2,466 Views)

Thanks for pointing that out.  The indexing issue I refered to earlier applies to the Get Excel Worksheet VI, which is part of the Report Generation Toolkit.

Meghan M.

0 Kudos
Message 5 of 6
(2,457 Views)
Problem solved, yes you have to wire up with an 11...thanx
0 Kudos
Message 6 of 6
(2,447 Views)