Vencejo

About _Excel_RangeFind() question

12 posts in this topic

#1 ·  Posted (edited)

Hi all,

I think i´m doing something wrong. In the following code, _excel_RangeFind() does not find all occurrences.
From sheet1 to sheet9 it does not find the occurrence of row 1, and on sheet10 it find it, but puts it last.
Where am I wrong?
Thank you very much and sorry for my inglish.
The code:
 
#include <Excel.au3>

Local $oAppl = _Excel_Open(True)
Local $oWorkbook= _Excel_BookNew($oAppl, 10)
Local $namesheet= "hoja";<-- Default name for sheet in spanish language: hoja1, hoja2, hoja3 etc.


For $x= 1 to 10;<-- $x completes the name of the excel sheet: $namesheet & $x
    for $y= 1 to 5
        _Excel_RangeWrite($oWorkbook, $namesheet & $x , "sofia" & " " & $namesheet & $x & " " & $y,"A" & $y)
    Next
Next

Local $search= _Excel_RangeFind($oWorkbook, "sof")
    _ArrayDisplay($search)

This is using 3.3.12 version and office 2007.

Edited by Vencejo

Share this post


Link to post
Share on other sites



#2 ·  Posted

I just tried with AutoIt 3.3.14.2. and Excel 2010 and it works as expected.

Can you please check the values of @error and @extended after calling _Excel_RangeWrite and _Excel_RangeFind?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I´m not sure if this is correct.

I write after line _excel_RangeWrite():

ConsoleWrite("Range write error: " & @error & " Extended: " & @extended & @CRLF)

and after line _excel_RangeFind:

ConsoleWrite("Range find error: " & @error & " Extended: " & @extended)

 

In both cases @error and @extended are 0 (zero).

 

 

Edited by Vencejo

Share this post


Link to post
Share on other sites

#4 ·  Posted

When you display the Excel workbook do all the sheets contain the expected data?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Yes. Array[40] detect A1data in row 1 only.

range find.jpg

Edited by Vencejo

Share this post


Link to post
Share on other sites

#6 ·  Posted

There was a bug in _Excel_RangeFind which has been fixed with version 3.3.13.21.
If you could upgrade to 3.3.14.2 then this bug is gone.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#7 ·  Posted

Ok thanks.

I had many many problems with 3.3.14 version and excel udf and read that 3.3.12 version solved it (it was true).

I will try 3.3.13 and check it

Thanks a lot!

 

Share this post


Link to post
Share on other sites

#8 ·  Posted

If you update the 3.3.14.2 version of the Excel UDF with the two fixed functions everything should run fine.

 


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#9 ·  Posted

I already knew the solution proposed in that post, but unfortunately in my case it did not work. Only using version 3.3.12 all excel udf problems completely disappeared.
Thank you for your help.

 

Share this post


Link to post
Share on other sites

#10 ·  Posted

I tested your script with AutoIt 3.3.14.2 plus the two fixed functions.
The result was as expected.
Which further problems did you notice?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Please, give me some days for an exact answer, but problems were not from Excel_RangeFind(), but may be _excel_rangeread and "this is not a object" or something, (I dont remember, sorry) 

I need upgrade to 3.3.14, extract the problematic part of code (it has more of 6000 lines) and upload it. And it is not easy because sometimes its work, sometimes not.

 

Edited by Vencejo

Share this post


Link to post
Share on other sites

#12 ·  Posted

Sure, take all the time you need :)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • LoneWolf_2106
      By LoneWolf_2106
      Hi everybody,
      i have to store an entire row of a Excel workbook into an array.  The row index is stored in a variable.
      How can i do it?
      Thanks in advance for your support.
    • LoneWolf_2106
      By LoneWolf_2106
      Hi everybody,
      i have to write a value into an excel column.
      I know where it starts from, but i don't know what the end is, last non-empty cell.
      How can i get the number of last non-empty cell?
      Thanks in advance.
      Regards 
    • Nareshm
      By Nareshm
      Hi All,
      I have excel file like this
      and i want to cut cell/text from excel to other software.

       
      I have to cut the cell of B column one by one and past into other software
      If Winexists("No Data Found")
      then restore cuted cell and goto next/down side cell
      How to do it ?
    • water
      By water
      Extensive library to control and manipulate Microsoft Excel charts.
      Theads: General Help & Support - Example Scripts
      BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort

      KNOWN BUGS (last changed: 2017-07-21)
      None. The COM error handling related bugs have been fixed.
       
    • Mag91
      By Mag91
      Hey Community,
      cause im too new in the Auto it world i will try it with the your help. hopefully.
      I woud like to know how i can handle my Problem.
      ----
      I have a Excel Data with 362 random numbers.
      For Example:
      1166642335374 1172899897343
      .....
      this numbers are a part of the filepath ...example
      D:\Projekte\1166_64233_5374
      as u can see its the first number of the Excel data. After the first 4 numbers it shoud make a "_" than another 5 "_"
      This is my first question. How can i handle this to make it Shell execute.
       
      --------
      Second question:
      If i am in the path.
      For Example:
      D:\Projekte\1166_64233_5374
      the code shoud search for specific PDF Files.
      They are named like: 0050569E364B1ED79B900F73E62660EC.pdf
      the first 15 letters are always the same
      0050569E364B1ED
      when he found this data he has to copy it on a Folder on the Desktop.
      (There can also be 2 or 3 pdfs in one Folder with this letters)
      ----
      Please give me some help :-)