Jump to content

search a string in excel file


AnuReddy
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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