sailaja Posted June 13, 2011 Share Posted June 13, 2011 Hi, I have dout the format of the Excel sheet in AutoIt is "Filename.xls" of Microsoft Office Excel 97-2003 Worksheet. When i am trying to execute the application it is placing the alternative value in a text box of particular column. Why this is happening? Can any one help me regarding this? Thanks Sailaja Link to comment Share on other sites More sharing options...
water Posted June 13, 2011 Share Posted June 13, 2011 Could you please post the code you have so far? That makes helping you a lot easier My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
sailaja Posted June 13, 2011 Author Share Posted June 13, 2011 $oExcel= _ExcelBookOpen("c:\excel.xls") _ExcelSheetActivate($oExcel, "sss") This is the code for opening excel sheet and activating the excel sheet. Link to comment Share on other sites More sharing options...
water Posted June 13, 2011 Share Posted June 13, 2011 (edited) Insert some error checking. Run this from SciTe and post what you get.#include <excel.au3> $oExcel= _ExcelBookOpen("c:\excel.xls") ConsoleWrite("Open: " & @error) _ExcelSheetActivate($oExcel, "sss") ConsoleWrite("Activate: " & @error)BTW: What you posted can't be the complete script because at least the #include at the top is missing.Please always post the complete script you use for testing and twhich can reproduce the errorsy ou encounter! Edited June 13, 2011 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
sailaja Posted June 13, 2011 Author Share Posted June 13, 2011 Hi,I have dout the format of the Excel sheet in AutoIt is "Filename.xls" of Microsoft Office Excel 97-2003 Worksheet. When i am trying to execute the application it is placing the alternative value in a text box of particular column.Why this is happening? Can any one help me regarding this?ThanksSailaja Link to comment Share on other sites More sharing options...
sailaja Posted June 13, 2011 Author Share Posted June 13, 2011 #include <Excel.au3> $oExcel = _ExcelBookOpen("C:\Program Files\AutoIt3\CC.xls") _ExcelSheetActivate($oExcel,"CC") #region ---Au3Recorder generated code Start --- Opt("WinWaitDelay",100) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) _WinWaitActivate("CC 47 [Drive: C, A: ABC, CC: 16, CC: 12]","") MouseClick("left",494,416,1) _WinWaitActivate("CC 47 [Drive: C, A: ABC, CC: 16, OCE: 12] - Con","") MouseClick("left",113,438,1) MouseClick("left",22,137,1) _WinWaitActivate("CC 47 [Drive: C, A: CC, CC: 16, OCE: 12] - Con - [CC]","") For $i = 2 To 500 $sCellValue = _ExcelReadCell($oExcel, $i, 2) MouseClick("left",343,95,1) Send($sCellValue) $sCellValue = _ExcelReadCell($oExcel, $i, 1) MouseClick("left",339,149,1) Send($sCellValue) MouseClick("left",611,149,1) Send($sCellValue) MouseClick("left",748,147,1) If WinExists("CCE") Then _WinWaitActivate("CCE","") MouseClick("left",228,99,1) ;_WinWaitActivate("CCE","") ;MouseClick("left",408,351,1) ElseIf WinExists("CC 47 [Drive: C, A: ABC, CC: 16.3, CC: 16.2] - CC - [CC]") Then _WinWaitActivate("CC 47 [Drive: C, A: ABC, CC: 16.3, CC: 16.2] - CC]","") MouseClick("left",311,531,1) MouseClick("left",662,528,1) EndIf Next _ExcelBookClose($oExcel) #region --- Internal functions Au3Recorder Start --- Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc #endregion --- Internal functions Au3Recorder End --- #endregion --- Au3Recorder generated code End --- This is the code that i am using and facing problem in excel it is placing alternate values in the text box of one particular column Link to comment Share on other sites More sharing options...
water Posted June 13, 2011 Share Posted June 13, 2011 You shouldn't mix COM (Excel.au3) and window handling (WinWait, MouseClick etc.) recorded by AU3Recorder. What are you going to do? Please describe (e.g. Put value "xyz" into cell "A2" on sheet "sss"). I'm sure that can be done by functions from Excel.au3. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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