Sign in to follow this  
Followers 0
martmeister

EXCEL HELP! Please help me read this cell

2 posts in this topic

Below is part of my code. The problem is that the Excel read cell command is not reading the cell. What I'm wanting to do is for whatever the number 1-10 in the cell, Autoit will determine from # to run this macro/ or what this ... I have tried lots of things and I am still getting stuck in this same situation.. can some please help .. I have also implemented some you guys suggestions but I still get problems when the program hits the read cell.... The excel cell has 1 number in it with no calculation formulas so I know it is not the cell.

IF someone can test a simple read cell if/then program from an excel cell please post a simple code... I thought this would be it up I must be doing something wrong on my part because I am just stuck right now with getting past this barrier. Thank a bunch guys!

....

....

....

$oExcel = _ExcelBookOpen("C:\\ALL.xlsm")

$val = _ExcelReadCell($oExcel, "DU1", 19) ; looks in cell to determine value for if then statement

If $val = 1 then

Send('!({F8})'); this runs a macro d.h.

Send("{TAB}")

Send("{DOWN}")

Send("{ENTER}")

ElseIf $val = 2 Then

Send('!({F8})')

Send("{TAB}")

Send("{DOWN 4}")

Send("{ENTER}")

....

...

Share this post


Link to post
Share on other sites



Below is part of my code. The problem is that the Excel read cell command is not reading the cell. What I'm wanting to do is for whatever the number 1-10 in the cell, Autoit will determine from # to run this macro/ or what this ... I have tried lots of things and I am still getting stuck in this same situation.. can some please help .. I have also implemented some you guys suggestions but I still get problems when the program hits the read cell.... The excel cell has 1 number in it with no calculation formulas so I know it is not the cell.

IF someone can test a simple read cell if/then program from an excel cell please post a simple code... I thought this would be it up I must be doing something wrong on my part because I am just stuck right now with getting past this barrier. Thank a bunch guys!

$oExcel = _ExcelBookOpen("C:\\ALL.xlsm")

$val = _ExcelReadCell($oExcel, "DU1", 19) ; looks in cell to determine value for if then statement

If $val = 1 then

If you meant row 1 col 19 then it would be: $val = _ExcelReadCell($oExcel, 1, 19)

If you meant row 1 col "DU" then it would be: $val = _ExcelReadCell($oExcel, "DU1")

You can use either notation, but you can't mix them.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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