LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 97 Getting all result of a Excel Spreadsheet using Activex

Hello! im trying to find all result of a string, in the second column on a excel document, i find this example searching in the forum, but im getting error 97 on invoke node in method FindNext, can anybody help me with this? Error 97.png

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

In order for us to help you, you should supply us with useful information.  A picture of your VI is not useful -- the VI, itself (that we can edit, try to run, inspect closely, etc.) would help.  It would also help if you included an example Excel Workbook and a clear description of what you want to do -- we might be able to come up with another method for your (but we need to better understand what you need).

 

Bob Schor

0 Kudos
Message 2 of 7
(3,812 Views)

Thanks for answer, here is the vi, an example of the excel sheet, i need to find in excel file all result of Part10 (for example), and the vi returns me the row and column, where is each one of the results.

 

Victor Mora

Download All
0 Kudos
Message 3 of 7
(3,803 Views)

Hope Attached File will help to eSearch Excel.pngxtract Values of Specific Row

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 7
(3,758 Views)

Victor,

     Sometimes you need to Adopt the Solution based on the relative strengths of the Platforms.  Based on the example Workbook you attached, the simplest, most robust, easiest to program, and definitely fastest method to find a specific item (Excel row is what I presume you want) is to use Excel as little as possible.  I would approach this problem as follows:

  1. Ask LabVIEW to open Excel.
  2. Find the specified Worksheet.
  3. Read the entire Worksheet into a LabVIEW 2D String array (I choose Strings because your data are a mix of what appears to be string and Integer data).
  4. Close Excel.
  5. Do all the rest of the processing, including searches, on the 2D array in LabVIEW.

I see you are using LabVIEW 2013.  The easiest way to "hook" LabVIEW and Excel is to use the Report Generation Toolkit, an Add-on for LabVIEW 2013.  Here's a LabVIEW 2016 snippet (if you have the RGT, you should be able to simply duplicate this code yourself for earlier LabVIEW Versions), and a partial view of the Results that you can compare with the Workbook you attached (they're the same ...).

Towertest.pngTowertest Result.png

Bob Schor

 

Message 5 of 7
(3,745 Views)
Thanks Bob, let me try with your method, and i Will comment if it works.
Regards!
0 Kudos
Message 6 of 7
(3,742 Views)

@iadalbash wrote:

Thanks for answer, here is the vi, an example of the excel sheet, i need to find in excel file all result of Part10 (for example), and the vi returns me the row and column, where is each one of the results.

 

Victor Mora


Change the _Worksheet Range method input from A1 to A:A (to search the first column). At the end wire ArraySize -1 to the lenght input of the Array subset function (not to the index input, that will give the last array element).

 

EDIT: You get error 97 when there is no match to the string to find in the specified range, you could filter out this error and specify "no match found" in the resulting array.

 

Ben64

Message 7 of 7
(3,731 Views)