Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simple excel automation
#1
Solved: 11 Years, 4 Months, 2 Weeks ago
I wrote following code for a task
task: There are two column A and B, these are parameterized with some values in data table. Using this values with calculator I want to calculate WOR and type output in excel's row(1,1) for first iteration and next value in cell(2,1) for second iteration. Please help

Code:
Set oexcel = createobject("Excel.Application")  'to create excel
oexcel.Visible = true
oexcel.Workbooks.Add

If not  Window("Calculator").Exist(1) Then
systemutil.Run ("C:\WINDOWS\system32\calc.exe")
End If
Window("Calculator").WinEdit("Edit").Type DataTable("A", dtGlobalSheet)
Window("Calculator").WinButton("/").Click
Window("Calculator").WinEdit("Edit").Type DataTable("B", dtGlobalSheet)
Window("Calculator").WinButton("=").Click
WOR = window("Calculator").WinEdit("Edit").GetROProperty("text")
Window("Calculator").WinButton("C").Click
oexcel.Workbooks.cells(1,1).value = WOR
Reply


Messages In This Thread
simple excel automation - by excellentpawan - 07-06-2013, 06:41 AM
RE: simple excel automation - by Ankur - 07-06-2013, 04:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  where can I find the help for excel & database automation abhi_biradar2006 0 1,961 05-20-2014, 01:08 AM
Last Post: abhi_biradar2006
  Need Excel template for mapping manual scripts to Automation scripts. ACCBAJPA 0 2,965 09-19-2013, 03:02 PM
Last Post: ACCBAJPA
  Add Simple Text Header mot0rola 2 2,501 07-09-2013, 10:30 AM
Last Post: Ankur
  Excel automation Sathiya 1 3,643 11-17-2012, 06:48 PM
Last Post: Ankesh
  Problem recording simple script shik_and 4 4,819 04-16-2012, 05:49 PM
Last Post: saikri

Forum Jump:


Users browsing this thread: 2 Guest(s)