Jump to content

Recommended Posts

Posted

hi guys,

i want to search a string in excel file without using path, instead using the title or the handle returned from attach, is it possible if so plz help me thru that

Posted

Hi,

Helpfile -> Index -> _Ex (1st function should be _ExcelBookAttach ()).

or you mean:

You could not start coding, because you don't understand how to handle functions?

;-))

Stefan

Posted

hmmmm after attaching it returns the handle, but for searching i need a excel path according to the syntax or _XLSearch so i want an alternative for this

Posted

Hi,

it is still not clear what you want.

If you have the handle, you can search your opened workbook.

Maybe this is helping you:

http://www.autoitscript.com/forum/index.php?showtopic=106095&st=0&p=749335&hl=search%20excel&fromsearch=1&#entry749335

;-))

Stefan

Posted

Hi,

it is still not clear what you want.

If you have the handle, you can search your opened workbook.

Maybe this is helping you:

http://www.autoitscript.com/forum/index.php?showtopic=106095&st=0&p=749335&hl=search%20excel&fromsearch=1&#entry749335

;-))

Stefan

ok let me explain:

i am actually downloading a file, which is an excel file

so it asks for options: open, close and cancel

when i click on open it opens an excel file

now from that i have to search a particular string

for that i am not understanding how to proceed

i did excelattach("title of the file","title")

i want _XLSearch

but here i need to specify path, for which i dont know the path

Posted (edited)

Hi,

i don't know function _xlsearch.

Solution one:

1) I would attach an existing excel workbook. (_ExcelBookAttach)

2) Then read the sheet into array.

3) Loop over array to find value or try an _ArrayFind ()

Solution two:

1) Save the opened workbook into tempfolder with another name -> so you know fullpath to your workbook

2) Use _ExcelBookOpen () in hidden mode to open your temp workbook.

3) Then perform _XLSearch with known fullpath

;-))

Stefan

Edited by 99ojo
Posted

Hi,

i don't know function _xlsearch.

Solution one:

1) I would attach an existing excel workbook. (_ExcelBookAttach)

2) Then read the sheet into array.

3) Loop over array to find value or try an _ArrayFind ()

Solution two:

1) Save the opened workbook into tempfolder with another name -> so you know fullpath to your workbook

2) Use _ExcelBookOpen () in hidden mode to open your temp workbook.

3) Then perform _XLSearch with known fullpath

;-))

Stefan

the functions you are talking about are from excel.au3 but i am using excelcom.au3 as a header file

Posted

Hi,

1) There must be a SaveAs function in excelcom.au3.

So save your excel file into temporary folder and reopen it with known path and perform your search you want to.

2) I think the conflict is the declaration of the excel constants in excel.au3 and excelcomm.au3.

You may paste and copy function parts from one to the other UDF.

;-))

Stefan

Posted

Hi,

1) There must be a SaveAs function in excelcom.au3.

So save your excel file into temporary folder and reopen it with known path and perform your search you want to.

2) I think the conflict is the declaration of the excel constants in excel.au3 and excelcomm.au3.

You may paste and copy function parts from one to the other UDF.

;-))

Stefan

hi stefan,

i did it now its working fine :mellow: thanks a lot

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...