Transfer the content of one column to notepad

Getting started -basics for starting with WinTask

Transfer the content of one column to notepad

Postby Carroll on Mon Oct 21, 2013 7:17 am

Hi,
I want to transfer the entire contents of one column in the excel file on open notepad by typing that content. Is it possible with Wintask?
Carroll
 
Posts: 9
Joined: Tue Aug 30, 2005 2:13 pm

Re: Transfer the content of one column to notepad

Postby TechSupport on Tue Oct 22, 2013 6:55 am

Hello,

Yes it's easy to do, here is a sample code:
Code: Select all
'Declare the array which receives the first column, I've put a maximum of 100 cells
Dim column$(100)
'Put in a variable the excel filename. It must be in the same folder as this script
fileexcel$="data.xlsx"
'populate the array with the content of A1 to A100
ReadExcel(fileexcel$,"A1:A100",column$())

'Launch notepad
Shell("notepad",1)

UseWindow("NOTEPAD.EXE|Edit|Untitled - Notepad|1",1)
i=0
'in a loop type the first element of the array, the second and so on, into notepad, until the array is empty
repeat
   SendKeys(column$(i)+"<Enter>")
   pause 20 ticks
i=i+1
until column$(i)=""


Regards.
WinTask Tech Support
TechSupport
 
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am


Return to Getting started

Who is online

Users browsing this forum: No registered users and 3 guests

cron