Jump to content

Excel to webform


hanum
 Share

Recommended Posts

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.html

Form data.xlsx

Link to comment
Share on other sites

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Moderators

hanum,

Please stick to just the one thread at a time in future - I have merged the one you started earlier. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

  1. We don't know what your problem is? Can you describe what doesn't work as detailed as possible?
  2. 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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

#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

_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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

  • Moderators

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.... :whistle:

 

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. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...