Jat421 Posted August 18, 2010 Share Posted August 18, 2010 (edited) Hi, Hi, Is there a way to lock the excel file while it's being read. Like when the process between _ExcelBookOpen() and _ExcelBookClose() in that time if another _ExcelBookOpen() tries to open the file it gives an error message for something? So, basically when a excel book is open another instance of that book shouldn't get opened. Thanks for all the help!! $File1 = "c:\test.xls" $i = _ExcelBookOpen($File1,0) $m = _ExcelReadCell($i,1,1) _ExcelRowDelete($i,1,1) _ExcelBookClose($i,1) ClipPut($m) MsgBox(0, "No is", $m) Edited August 18, 2010 by Jat421 Link to comment Share on other sites More sharing options...
MrMitchell Posted August 18, 2010 Share Posted August 18, 2010 From what I understand and from my own experience... If you have permission to write to it from the account that's opening it, then it should lock it soon as it opens unless you specify to open in read-only mode. If you don't have write permissions on the file or if something else has it open already then AutoIt will open in read-only mode automatically. Link to comment Share on other sites More sharing options...
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