ANSHQ01 Posted March 15, 2024 Posted March 15, 2024 Hello Experts, Following Coding does not work , ERROR IS "EXCEL SHEET NOT LOADED" could not proceed further .. in summary file name is always OTR.XLSX, file is always open Sheet name is " A" start row is E1 webpage is always open in Edge https://www.booking2.sellingplatformconnect.amadeus.com thnaks forum.au3
Moderators Melba23 Posted March 15, 2024 Moderators Posted March 15, 2024 Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states: Quote Share your cool AutoIt scripts, UDFs and applications with others. Do not post general support questions here, instead use the AutoIt Help and Support forums. Moderation Team Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
ioa747 Posted March 15, 2024 Posted March 15, 2024 (edited) expandcollapse popup#include <Excel.au3> #include <Constants.au3> Global Const $START = 2 ; E1<========= starting row to begin reading from your excel sheet ; Create application object and open an example workbook Global $oExcel = _Excel_Open() $oWorkbook = _Excel_BookOpen($oExcel, @ScriptDir & "\Book1.xls") If @error Then Exit MsgBox($MB_SYSTEMMODAL, "", "Error opening Book1.xls") Global $iLastRow = $oWorkbook.ActiveSheet.Usedrange.Rows.Count Global $aList = _Excel_RangeRead($oWorkBook, Default, "E" & $START & ":E" & $iLastRow) ; Read column E from START to end If @error or Not IsArray($aList) Then Exit MsgBox($MB_OK, "Error", "unable to read column from excel sheet") _ArrayDisplay($aList) ; Display content of column E HotKeySet("{PGDN}", CopyNextCell) ; PageDown to copy next cell into your other app HotKeySet("^+{END}", Terminate) ; ctrl-shift-end to exit your script While Sleep(100) WEnd Func Terminate() Exit EndFunc Func CopyNextCell() Local Static $iPos = 0 Local $hWnd = WinActivate("[CLASS:Notepad]") ; https://www.booking2.sellingplatformconnect.amadeus.com/ If Not $hWnd Then Exit MsgBox($MB_OK, "Error", "Application not loaded") WinWaitActive($hWnd) Send("^a{DEL}" & $aList[$iPos]) ;ControlSetText($hWnd, "", "Your control name here", $aList[$iPos]) ; LOT better but you need to find the control with au3info.exe $iPos += 1 If $iPos > $iLastRow - $START Then Exit MsgBox($MB_OK, "Warning", "Last row reached, exiting script") EndFunc Edited March 15, 2024 by ioa747 I know that I know nothing
Nine Posted March 15, 2024 Posted March 15, 2024 (edited) That code looks very familiar... Spoiler https://www.autoitscript.com/forum/topic/211293-script-to-copy-excel-cell-content-and-paste-in-another-programe-moved/#comment-1528472 Could you check @error AND @extended after the attach Edited March 15, 2024 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
ANSHQ01 Posted March 17, 2024 Author Posted March 17, 2024 Hi IOA747, Thanks for editing codes. Full original code credit for solution goes to MVP "Nine". initially , Code did not worked, so attempted to learn by myself on YouTube Google, realised its a requires deep knowledge. Edited code opens Excel file but is motion less for next step for copying cell content and pasting on Open Website , probably Edge security is preventing, Any suggestion /recommendation for other browsers? Thanks
Nine Posted March 17, 2024 Posted March 17, 2024 If you intend to automate Web pages, I strongly suggest you take a look at “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
ANSHQ01 Posted March 22, 2024 Author Posted March 22, 2024 @NINE, Thanks for suggestion, UDF getting more complex now...for me it's like not knowing simple addition attempting to learn calculus! Appreciate your help here again, web page is already open (https://www.booking2.sellingplatformconnect.amadeus.com/app_sell2.0/apf/init/login?SITE=LOGINURL&LANGUAGE=GB&e=j&OFC=SYDA82737) in Chrome or Edge suggestion by ioa747 opens excel file and no further activity, just stop Thanks
ioa747 Posted March 22, 2024 Posted March 22, 2024 1 hour ago, ANSHQ01 said: suggestion by ioa747 opens excel file and no further activity, just stop _ArrayDisplay with data from column E is not displayed? and if you took a look at the code you'll notice that I've changed the link since I didn't have access to it with the Notepad window so if you have Notepad open and press the {PGDN} (page down shortcut) it will transfer the data to Notepad like you did with the this page, have you tried? I know that I know nothing
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