Jump to content

Excel problem in read cell


Recommended Posts

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

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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

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
Link to comment
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)")

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

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

 

 

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...