AnuReddy Posted February 22, 2010 Posted February 22, 2010 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
99ojo Posted February 22, 2010 Posted February 22, 2010 Hi, have a look at the integrated excel functions _Ex*. ;-)) Stefan
AnuReddy Posted February 22, 2010 Author Posted February 22, 2010 Hi,have a look at the integrated excel functions _Ex*.;-))Stefani could not get
99ojo Posted February 22, 2010 Posted February 22, 2010 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
AnuReddy Posted February 22, 2010 Author Posted February 22, 2010 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
99ojo Posted February 22, 2010 Posted February 22, 2010 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
AnuReddy Posted February 22, 2010 Author Posted February 22, 2010 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;-))Stefanok let me explain:i am actually downloading a file, which is an excel fileso it asks for options: open, close and cancelwhen i click on open it opens an excel filenow from that i have to search a particular stringfor that i am not understanding how to proceedi did excelattach("title of the file","title")i want _XLSearchbut here i need to specify path, for which i dont know the path
99ojo Posted February 22, 2010 Posted February 22, 2010 (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 February 22, 2010 by 99ojo
AnuReddy Posted February 22, 2010 Author Posted February 22, 2010 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 workbook2) Use _ExcelBookOpen () in hidden mode to open your temp workbook.3) Then perform _XLSearch with known fullpath;-))Stefanthe functions you are talking about are from excel.au3 but i am using excelcom.au3 as a header file
dani Posted February 22, 2010 Posted February 22, 2010 Then you include Excel.au3 as well, I don't see the problem.. ?
AnuReddy Posted February 22, 2010 Author Posted February 22, 2010 Then you include Excel.au3 as well, I don't see the problem.. ?if i include both it raises conflict
99ojo Posted February 22, 2010 Posted February 22, 2010 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
AnuReddy Posted February 23, 2010 Author Posted February 23, 2010 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.;-))Stefanhi stefan,i did it now its working fine thanks a lot
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now