Jump to content
Sign in to follow this  
hanum

Excel to webform

Recommended Posts

hanum
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

Share this post


Link to post
Share on other sites
water

Which browser do you use?

There are UDFs available for IE, FF and Chrome.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
hanum

hi water,

im using Chrome browser

Share this post


Link to post
Share on other sites
Melba23

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

 

Share this post


Link to post
Share on other sites
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
hanum
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)

Share this post


Link to post
Share on other sites
water
  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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
hanum

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)

Share this post


Link to post
Share on other sites
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
hanum

yes its title of browser water.

unable to send the data on form(attached form).

can you direct me, how can i send data

Share this post


Link to post
Share on other sites
water

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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Danp2

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.

Share this post


Link to post
Share on other sites
hanum

#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

Share this post


Link to post
Share on other sites
water

_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 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
hanum

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

Share this post


Link to post
Share on other sites
Melba23

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×