I have to edit an excel file and delete some columns, but I cannot find the right commands nor using mouse strokes as it doesn't remember the position.
Thanks.
How to add task between applications??
Re: How to add task between applications??
Excel actions can get cells from Excel document or put some data to Excel document
If you want to do some advanced actions you have top use VB script and learn Excel object structure
Look at my example please (see below)
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
the script is
If you want to do some advanced actions you have top use VB script and learn Excel object structure
Look at my example please (see below)
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1075658632
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task613"
Hide=INTEGER|0
ID=INTEGER|927607580
LogOnAsUser=INTEGER|1
Name=STRING|"Delete column"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
[Actions\Action1]
ActionID=STRING|"A_SCRIPT_VBSCRIPT"
Enabled=INTEGER|-1
Name=STRING|"VB Script"
Params=FOLDER
[Actions\Action1\Params]
expandvars=STRING|"0"
line00000000=STRING|"Sub DeleteColumn(clmn)"
line00000001=STRING|" set app = CreateObject(""Excel.Application"")"
line00000002=STRING|" app.Visible = true"
line00000003=STRING|" set book = app.workbooks.Open(""C:\Users\olegyershov\Documents\test.xls"")"
line00000004=STRING|" 'Messagebox(""Press OK"")"
line00000005=STRING|" app.Columns(clmn +"":""+clmn).Select"
line00000006=STRING|" app.Selection.Delete Shift=xlToLeft"
line00000007=STRING|" 'Messagebox(""Press OK"")"
line00000008=STRING|" book.save"
line00000009=STRING|" app.quit"
line0000000A=STRING|"End Sub"
line0000000C=STRING|"DeleteColumn(""E"")"
linecount=STRING|"14"
savescript=STRING|"0"
Code: Select all
Sub DeleteColumn(clmn)
set app = CreateObject("Excel.Application")
app.Visible = true
set book = app.workbooks.Open("C:\Users\olegyershov\Documents\test.xls")
app.Columns(clmn +":"+clmn).Select
app.Selection.Delete Shift=xlToLeft
book.save
app.quit
End Sub
DeleteColumn("E")
Oleg Yershov