hanum Posted November 16, 2013 Share Posted November 16, 2013 Can anyone help me on my program... i can read the data from excel. but unable to send the data in form can anyone suggest me how to send the data. This is my code. i attached my form and excel. #include <Excel.au3> #include <Array.au3> Global $sFilePath = @ScriptDir & "form data.xlsx" Global $oExcel = _ExcelBookOpen($sFilePath) If @error = 1 Then MsgBox(0, "Error!", "Unable to Create the Excel Object") Exit ElseIf @error = 2 Then MsgBox(0, "Error!", "File does not exist - Shame on you!") Exit EndIf Local $aArray = _ExcelReadSheetToArray($oExcel) ;Reading created Excel _ArrayDisplay($aArray, "Array using Default Parameters") For $y = 1 To UBound($aArray, 1) - 1 For $x = 1 To UBound($aArray, 2) - 1 $aArray[$y][$x] = StringStripCR($aArray[$y][$x]) $aArray[$y][$x] = StringStripWS($aArray[$y][$x], 1) $aArray[$y][$x] = StringStripWS($aArray[$y][$x], 2) Next Next form.htmlForm data.xlsx Link to comment Share on other sites More sharing options...
water Posted November 16, 2013 Share Posted November 16, 2013 Which browser do you use? There are UDFs available for IE, FF and Chrome. 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...
l3ill Posted November 16, 2013 Share Posted November 16, 2013 Hi hanum, With a For To Next Loop and ExcelReadCell to get data and ControlSend to your form. Bill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
hanum Posted November 16, 2013 Author Share Posted November 16, 2013 hi water, im using Chrome browser Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 16, 2013 Moderators Share Posted November 16, 2013 hanum,Please stick to just the one thread at a time in future - I have merged the one you started earlier. M23 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 Link to comment Share on other sites More sharing options...
water Posted November 16, 2013 Share Posted November 16, 2013 ControlSend rarely works with Browsers. Have a look at the Chrome UDF in the Example Scripts Forum. 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...
Danp2 Posted November 16, 2013 Share Posted November 16, 2013 It appears to be a simple form. Any of the browser UDFs should be able to handle this easily. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
water Posted November 16, 2013 Share Posted November 16, 2013 It's a simple form, true. But if the user has Chrome installed he is limited to the Chrome UDF. 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...
hanum Posted November 16, 2013 Author Share Posted November 16, 2013 here i writed code. Can any one direct me whre i did mistake #include <Excel.au3> #include <Array.au3> $pos = MouseGetPos() Local $sFilePath1 = @ScriptDir & "Form.xlsx" ;This file should already exist Local $oExcel = _ExcelBookOpen($sFilePath1) If @error = 1 Then MsgBox(0, "Error!", "Unable to Create the Excel Object") Exit ElseIf @error = 2 Then MsgBox(0, "Error!", "File does not exist - Shame on you!") Exit EndIf Local $aArray1 = _ExcelReadArray($oExcel, 1, 1, 5, 1) ;Direction is Vertical Local $aArray2 = _ExcelReadArray($oExcel, 1, 1, 5, 1) ;Direction is Horizontal _ArrayDisplay($aArray2, "Horizontal") _ArrayDisplay($aArray1, "Vertical") MsgBox(0, "Exiting", "Press OK to Save File and Exit") For $i = 0 To UBound($aArray2) - 1; appended MsgBox(0,"",$aArray2[$i]) Next For $i = 0 To UBound($aArray1) - 1 MsgBox(0,"",$aArray1[$i]) Next Sleep(30) ;send("^{PGDN}") WinActivate("1") WinWaitActive("1") MouseClick("left",676,85,1) sleep(130) ControlSend("1", "","" ,"+") Sleep(50) Link to comment Share on other sites More sharing options...
water Posted November 16, 2013 Share Posted November 16, 2013 We don't know what your problem is? Can you describe what doesn't work as detailed as possible? Can you please enclose AutoIt code in code tags? That's the blue "A" icon in the editor. That enhances redability 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...
hanum Posted November 16, 2013 Author Share Posted November 16, 2013 hi water/Danp2/Billo thank for sending the valuable suggestions. all are mentioning it is very simple form. Can any one direct me Thank in advance, #include <Excel.au3> #include <Array.au3> $pos = MouseGetPos() Local $sFilePath1 = @ScriptDir & "\Form.xlsx" ;This file should already exist Local $oExcel = _ExcelBookOpen($sFilePath1) If @error = 1 Then MsgBox(0, "Error!", "Unable to Create the Excel Object") Exit ElseIf @error = 2 Then MsgBox(0, "Error!", "File does not exist - Shame on you!") Exit EndIf Local $aArray1 = _ExcelReadArray($oExcel, 1, 1, 5, 1) ;Direction is Vertical Local $aArray2 = _ExcelReadArray($oExcel, 1, 1, 5, 1) ;Direction is Horizontal _ArrayDisplay($aArray2, "Horizontal") _ArrayDisplay($aArray1, "Vertical") MsgBox(0, "Exiting", "Press OK to Save File and Exit") For $i = 0 To UBound($aArray2) - 1; appended MsgBox(0,"",$aArray2[$i]) Next For $i = 0 To UBound($aArray1) - 1 MsgBox(0,"",$aArray1[$i]) Next Sleep(30) ;send("^{PGDN}") WinActivate("1") WinWaitActive("1") MouseClick("left",676,85,1) sleep(130) ControlSend("1", "","" ,"+") Sleep(50) Link to comment Share on other sites More sharing options...
water Posted November 16, 2013 Share Posted November 16, 2013 You need to tell us what DOESN'T work. I'm not going to test and search the problem for you. What is WinActivate("1") supposed to do? Is "1" the title of the browser window? 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...
hanum Posted November 16, 2013 Author Share Posted November 16, 2013 yes its title of browser water. unable to send the data on form(attached form). can you direct me, how can i send data Link to comment Share on other sites More sharing options...
water Posted November 16, 2013 Share Posted November 16, 2013 yes its title of browser water. Are you sure? The title of a Browser Windows most of the times at least contains the Browser name itself. In FF for this site it is "Excel to webform - Generel Help and Support - AutoIt Forums - Mozilla FireFox". 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...
Danp2 Posted November 16, 2013 Share Posted November 16, 2013 It's a simple form, true. But if the user has Chrome installed he is limited to the Chrome UDF. Ah... I missed that info, possibly due to the threads being merged. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
hanum Posted November 16, 2013 Author Share Posted November 16, 2013 #include <Excel.au3> #include <Array.au3> #include <IE.au3> $pos = MouseGetPos() Local $sFilePath1 = @ScriptDir & "\form.xlsx" ;This file should already exist Local $oExcel = _ExcelBookOpen($sFilePath1) If @error = 1 Then MsgBox(0, "Error!", "Unable to Create the Excel Object") Exit ElseIf @error = 2 Then MsgBox(0, "Error!", "File does not exist - Shame on you!") Exit EndIf Local $aArray1 = _ExcelReadArray($oExcel, 2, 1, 10, 0) ;Direction is Vertical _ArrayDisplay($aArray1, "Vertical") MsgBox(0, "Exiting", "Press OK to Save File and Exit") sleep(100) Local $oIE_basic = _IE_Example("form.html") As per previous post tried this one this is also throwing error on Local $oIE_basic = _IE_Example("form.html") Can you fix this problem Link to comment Share on other sites More sharing options...
water Posted November 16, 2013 Share Posted November 16, 2013 _IE_Example is only for testing. It doesn't accept an URL. Do you now want to run your script with IE? Because you posted above that you are using Chrome. 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...
hanum Posted November 16, 2013 Author Share Posted November 16, 2013 hi water u you suggested are questioning. you are not giving any idea on posts. only asking questions. thats it. i can accept previously i asked chrome u suggested on any chrome ideas. not even single direction... i'm trying to success the script based on previous post. it's problem is throwing on line.. it's time waste to asking and seeking on online help ... is my strong opinion.. bye water...... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 16, 2013 Moderators Share Posted November 16, 2013 hanum, hi water u you suggested are questioning.you are not giving any idea on posts.only asking questions. thats it.Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. And in order to held they need to understand the problem and the environment - hence the questions. If you do not want to answer the questions, we can only conclude that you do not want an answer. So the obvious thing to do in this thread will happen in a moment.... bye water......I suggest you change your behaviour in future threads if you want any help here - or it will be "Goodbye hanum" as well. M23 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 Link to comment Share on other sites More sharing options...
Recommended Posts