Jump to content
Sign in to follow this  
hkorchek

Taking data from excel and entering it into a 3rd party app

Recommended Posts

hkorchek

Hello,

I am working with a third party application in which I am creating new users with about 10 fields of information. I would like to be able to have an excel spreadsheet with this info already completed and have the fields on the 3rd party application be auto filled. I am unsure exactly what I may need to accomplish this (macro, scripts, something like autoit). The information being entered is simply things like first and last name, SNN, address, things of this nature. There will be hundreds to enter and I do not have access to the data files to create them. I would simply like to speed up the data entry process if possible. Thank you in advance for your help.

Share this post


Link to post
Share on other sites
Zedna

All that is possible & simple in AutoIt.

Look at

- Excel UDF in latest AutoIt beta (in helpfile)

- look at Au3Info.exe tool which helps identify kinds of controls inside your target application

- Send() command

Share this post


Link to post
Share on other sites
hkorchek

Thank you very much for the reply. This is my first time using this software so I'm sure I have some reading to do. Also, are the script created by this going to be able to wait until I place the cursor in the correct text field on the application I want to auto fill?

Share this post


Link to post
Share on other sites
Zedna

Also, are the script created by this going to be able to wait until I place the cursor in the correct text field on the application I want to auto fill?

Yes. ControlGetFocus()

But you may autofill all inputs without any user (mouse) activity.

Share this post


Link to post
Share on other sites
hkorchek

All that is possible & simple in AutoIt.

Look at

- Excel UDF in latest AutoIt beta (in helpfile)

- look at Au3Info.exe tool which helps identify kinds of controls inside your target application

- Send() command

I was unable to find the Excel UDF in the beta version in the help files. Would it be under something else? I am brand new to this software so I am trying to learn this from scratch.

Share this post


Link to post
Share on other sites
hkorchek

The excel functions are under User defined functions. the functions you want to use are:

_ExcelBookAttach

_ExcelReadArray

_ExcelReadCell

Thank you for the help. Any suggestions on where to start reading for a total beginner. I will basically be trying to input data from excel into a client app's fields.

Share this post


Link to post
Share on other sites
Zedna

Thank you for the help. Any suggestions on where to start reading for a total beginner. I will basically be trying to input data from excel into a client app's fields.

Definitely start reading AutoIt's helpfile - some basics/examples.

Share this post


Link to post
Share on other sites
Bert

From the helpfile:

; ***************************************************************
; Example 1 - Write to a Cell after opening a workbook and returning its object identifier.  Read the cell, then Save and Close file.
; *****************************************************************

#include <Excel.au3>

Local $oExcel = _ExcelBookNew();Create new book, make it visible

_ExcelWriteCell($oExcel, "I Wrote to This Cell", 1, 1);Write to the Cell
$sCellValue = _ExcelReadCell($oExcel, 1, 1)
MsgBox(0, "", "The Cell Value is: " & @CRLF & $sCellValue, 2)

MsgBox(0, "Exiting", "Press OK to Save File and Exit")
_ExcelBookSaveAs($oExcel, @TempDir & "\Temp.xls", "xls", 0, 1); Now we save it into the temp directory; overwrite existing file if necessary
_ExcelBookClose($oExcel); And finally we close out

; ***************************************************************
; Example 2 - Write to a Cell using a Loop, after opening a workbook and returning its object identifier.  Read the cells, then Save and Close file.
; *****************************************************************

#include <Excel.au3>

Local $oExcel = _ExcelBookNew();Create new book, make it visible

For $i = 1 To 5;Loop
    _ExcelWriteCell($oExcel, $i, $i, 1);Write to the Cell
Next

For $i = 1 To 5;Loop
    $sCellValue = _ExcelReadCell($oExcel, $i, 1)
    MsgBox(0, "", "The Cell Value is: " & @CRLF & $sCellValue, 2)
Next

MsgBox(0, "Exiting", "Press OK to Save File and Exit")
_ExcelBookSaveAs($oExcel, @TempDir & "\Temp.xls", "xls", 0, 1); Now we save it into the temp directory; overwrite existing file if necessary
_ExcelBookClose($oExcel); And finally we close out
Edited by Volly

Share this post


Link to post
Share on other sites
hkorchek

Thank you for the help all. I have gotten some great information. One problem I think I might come across is that the window I need to enter info on is a child window in the application. This window does have a name on the tile but it is not a loaded window in the task bar. Is this going to pose a huge issue?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×