sailaja 0 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 Share this post Link to post Share on other sites
water 2,384 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 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
sailaja 0 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. Share this post Link to post Share on other sites
water 2,384 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 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
sailaja 0 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 Share this post Link to post Share on other sites
sailaja 0 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 Share this post Link to post Share on other sites
water 2,384 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 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites