Sign in to follow this  
Followers 0
HaNdLoRdz

Excel problem in read cell

6 posts in this topic

hello all,

im new here n want to learn AutoIT.

in my case I want my program when I pressed update buttons it will search whatever I write in $input6 (ex: my name), n will search it in Book1.Xls.

if book1.xls (colomn A) have my name, messagebox will announce it (true or false).

 

anyone can help me?

sorry for my bad English

thx in advance

design 1.au3

Share this post


Link to post
Share on other sites



You describe what you want to do, but you didn't describe your problem.

Do you get an error message? Which Excel version do you run? etc. etc.


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)

You describe what you want to do, but you didn't describe your problem.

Do you get an error message? Which Excel version do you run? etc. etc.

hi water,

oh sorry, my problem are when I search it its look like they not searching on that excel book (book1.xls)

ex : (book1.xls)

(column A)          (column B)          (column C)

1. water

2. handlord

3. abc

4. aaa

5. bbb

if I input "water" in $input6 the result always "False" (they didn't read it in correct way)

any advice water?

im using Microsoft excel 2010

 

thx

Edited by HaNdLoRdz

Share this post


Link to post
Share on other sites

check for the value of @error after you call

  • _ExcelBookOpen to see if it's opening properly
  • _ExcelReadCell to see why it's not getting the value properly

 

also I think the default file extension for excel 2010 is xslx so might want to change this line:

$buka = fileopendialog("Browse","C:","Excel Document (*.Xls)")

Share this post


Link to post
Share on other sites

check for the value of @error after you call

  • _ExcelBookOpen to see if it's opening properly
  • _ExcelReadCell to see why it's not getting the value properly

 

also I think the default file extension for excel 2010 is xslx so might want to change this line:

$buka = fileopendialog("Browse","C:","Excel Document (*.Xls)")

hmm...tryin to understanding..LOL

just curious to know coz im only newbie in programming n autoit too.

hmm..excel version is nothing..

but thx for advice

Share this post


Link to post
Share on other sites

after this line:

$bukaexcel = _ExcelBookOpen($Baca)

do this:

msgbox(1,"RESULT of ExcelBookOpen","Error Message: " & @error)

 

if you right click on the function name and press F1 it'll open the helpfile on the function and in there you will find what the error codes mean.  in this case 1 means unable to create object and 2 means File Does Not Exist.

 

Do the same immediately after _ExcelReadCell and post your results here.  Someone will help you.  It won't be me though cause i'm off to the rollerdisco

 

 

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
Sign in to follow this  
Followers 0