Excel Pivots

Discuss RoboTask here
Post Reply
crotalus
Posts: 1
Joined: Tue Mar 31, 2015 8:53 am

Excel Pivots

Post by crotalus »

Dear All,

sre Excel pivots and query to external data already supported in Robotask?

Best regards
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Excel Pivots

Post by Oleg »

Unfortunately not.
RoboTask contains the most popular functions for Excel:
  • Get cell value
  • Set cell value
  • Save document
and others

You can use VB script or macrorecorder in Excel application to make more complex automation of Excel document.
Excel macrorecorder creates the macro as VB script in the document.
You can use this script as template for your own script.
Oleg Yershov
bestazy
Posts: 1
Joined: Wed Jan 24, 2018 8:47 am
Contact:

Re: Excel Pivots

Post by bestazy »

Hello!
I'm attempting to automate something for the first time, and I need some help. This doesn't /need/ to be in RoboTask, but it does have to be in a free automation tool.

I need RoboTask to go to Excel and copy the data in A1. Then I need to have it switch to a proprietary program and paste A1 contents into a field and hit Enter. I've gotten that far with the record macro option. After this point, RoboTask needs to find a certain text string in the program, and print the page on which it appears and any subsequent pages.

Then I need it to return to Excel, move down a cell and repeat the macro. Preferably, I would like it to continue this process until it reaches an empty cell, at which point the task would end.

I've managed to get 1/3 of this macro done, but I'm at a standstill concerning how to find the string and how to move the macro down a cell. Any advice? Thanks!
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Excel Pivots

Post by Oleg »

Look at the example how to process column until the empty value
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|2091586075
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task302"
Hide=INTEGER|0
ID=INTEGER|1490976608
LogOnAsUser=INTEGER|1
Name=STRING|"process column in Excel"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action10=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""ROW"" with value ""1"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"ROW"
varvalue=STRING|"1"

[Actions\Action10]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

[Actions\Action2]
ActionID=STRING|"A_EXCEL_OPEN"
Enabled=INTEGER|-1
Name=STRING|"Excel Open Document"
Params=FOLDER

[Actions\Action2\Params]
filename=STRING|"D:\Temp\test.xls"
hide=STRING|"0"
mode=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""CELLVALUE"" with value ""begin"""
Params=FOLDER

[Actions\Action3\Params]
expand=STRING|"0"
varname=STRING|"CELLVALUE"
varvalue=STRING|"begin"

[Actions\Action4]
ActionID=STRING|"A_LOOP_WHILE"
Enabled=INTEGER|-1
Name=STRING|"While loop"
Params=FOLDER

[Actions\Action4\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"8"
type=STRING|"0"
value1=STRING|"{cellValue}"

[Actions\Action5]
ActionID=STRING|"A_EXCEL_GET"
Enabled=INTEGER|-1
Name=STRING|"Excel Get Cells"
Params=FOLDER

[Actions\Action5\Params]
cell00000000=STRING|"R{row}C1"
count=STRING|"1"
var00000000=STRING|"CellValue"
worksheet=STRING|"1"

[Actions\Action6]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action6\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"8"
type=STRING|"0"
value1=STRING|"{cellValue}"

[Actions\Action7]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{CellValue}"""
Params=FOLDER

[Actions\Action7\Params]
icon=STRING|"1"
msg0=STRING|"{CellValue}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action8]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action9]
ActionID=STRING|"A_VARIABLES_INCREMENT"
Enabled=INTEGER|-1
Name=STRING|"Increment variable ""row"""
Params=FOLDER

[Actions\Action9\Params]
incement=STRING|"1"
vaiable=STRING|"row"
Oleg Yershov
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Excel Pivots

Post by Oleg »

...needs to find a certain text string in the program...
...how to find the string...
Where do you want to find some string?
You easily can check the existence of some string in text (text file or text in variable).
But I think that you mean something else.
Oleg Yershov
Post Reply