jfcby Posted July 25, 2008 Share Posted July 25, 2008 Hello, I'm working with an Excel Worksheet where I need to read cell values and store them in a varible to use in the script. Is there a way to check if the workbook open? Can the following script be modified to read cell values if the workbook is already open? #include <Excel.au3> $sFilePath1 = "C:\Documents and Settings\User\Desktop\ScriptProect\FFPM\Equip_List_FF.xls" $oExcel = _ExcelBookOpen($sFilePath1) Sleep(2000) $sCellValue = _ExcelReadCell($oExcel, 4, 1) MsgBox(0, "", "The Cell Value is: " & @CRLF & $sCellValue, 2) Thank you for your help, jfcby Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB **** Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 25, 2008 Share Posted July 25, 2008 Hello, I'm working with an Excel Worksheet where I need to read cell values and store them in a varible to use in the script. Is there a way to check if the workbook open? Can the following script be modified to read cell values if the workbook is already open? #include <Excel.au3> $sFilePath1 = "C:\Documents and Settings\User\Desktop\ScriptProect\FFPM\Equip_List_FF.xls" $oExcel = _ExcelBookOpen($sFilePath1) Sleep(2000) $sCellValue = _ExcelReadCell($oExcel, 4, 1) MsgBox(0, "", "The Cell Value is: " & @CRLF & $sCellValue, 2) Thank you for your help, jfcby In the UDF: _ExcelAttach() Updated function from big_daddy: _ExcelBookAttach() 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 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