My trials with SAP iRPA – Hello Excel
Posts in the series
|1||Hello Excel – Set Cell value and different formatting options|
|2||Hello Excel – Reading range of data via inbuilt activity, look at Concept of Context briefly and scripting|
|3||UI Designer design screen for data read from excel file|
First of all a Happy New year, every one has his/her learning list for 2020 ready(for inspiration check these brilliant one’s from DJ Adams here, Marius here and Witalij here ) so do I?. The SAP IRPA of-course is in my to do list. So through the series of blog post I will share my experience of my trials. As a first impression I found the SAP IRPA solution to be complex one as compared to the other solutions such as UIPath.
So that is what triggered these posts where we will go from pretty basic stuff to the complex one’s. This will help me as well the readers in understanding it better. Where shall we start I believe excel must be on everyone’s list so thought of starting from here!
What we are trying to do?
In the very first post we will simply try to write data to an excel file cell and use different formatting options nothing much fancy, slowly the scenario’s will get complex.
Following this great blog post from Vijay I have my set up ready and running. I would recommend everyone who wants to learn is to first complete the basic tutorials from here and then can do the openSAP course. Why tutorial first and then the course is because tutorial did not take much time and gave me a high-level overview and head start. I will say both are great resources, its more of an individual preference. The first time we opened the studio and the information was overwhelming so many blocks but no problem let me try to explain it via a snap shot
So lets create our first project which will update and format the excel cell value. Please do remember we have different options of achieving the same thing such as via screen shots, workflows or scripting etc.
The RPA provide us with in built libraries to interact with such as excel, outlook etc. So as next step we will include the excel library. Go to scripts tab->Right click->Include library script for excel->Save
So now everything is set lets design our first workflow which is nothing but sequence of steps we want to take. Go to workflow tab -> Right click Global-> Create new workflow-> Add a sequence type activity
Now double click the sequence and we will add our our steps from excel library. The first step is to initialize the excel and open the sheet.
Set the cell value. We will hardcode it for time being to RPA, in future posts we will see how to specify them dynamically via context etc.
Set the background color
Set the font size
Make it bold and change the font color
Save and Close the excel. Then add the end the excel step why…? So the excel running task in task manager shall be closed and resources are set to free
Press save and you can see the JS code being auto generated for the same.We are all set let’s build it and run it.
So now we expect a blank excel cell to be filled with value and different formatting applied.
What is next?
We have seen here basic interaction between an excel cell and RPA, in next post we will take it to the next level to bring the concept of context and reading and writing multiple rows of data. Feel free to provide your feedback!
Nice Nabheet 🙂 .. so now we have atleat one common learning task for 2020 :-)...
Hi Nabheet, Its very insightful.
Sorry, but as almost all content for iRPA so far, this cant be followed by beginners... If you just click play, nothing happens, i guess we need to after, go to agent system tray icon and hit Test 'Project Name' right? and then if you get an error (i did cause didnt put the double back slashes in excel path) also my studio dont say anything, just i see a popup saying a trace file has been created... Also, should the project be stopped after closing excel? I appreciate all content being released as i am coming from uipath and this is being very hard to learn so far, so thx!
Thanks for the feedback. Once you click run then you need to go the agent icon and click on the project which is highlighted in the video demo.
Regarding your second error "(i did cause didnt put the double back slashes in excel path)" If you look at the help which get on the field it mention about double back slashes. I also got confused here but that is part of the learning curve i will say.
The trace file is like you have got some error in your code which has caused program to terminate same you can see in the log window.
We are in the development environment so we normally stop it and then make changes, build it and run again.
I will be honest here i am also trying to get my head around SAP Intelligent RPA along with Automation anywhere and UIPath i can feel the difference. I will recommend doing the openSAP course. first if you have not done already it will help you in settling down.
In case you are still stuck you can post your queries as Q&A and our community will be happy to help you.
Followed step-by-step . Achieved the result.
And one important point…I had the same error of double backslashes reported by the tool. However, it got me to wear the developer hat until resolution .
(And , i suggest all the users to wear the Hat if you are following different exercises outlined above).
I am NOT taking any sides here. You are free to follow your own approach.
I am an SAP Technical manager. We are currently using Blueprism RPA tool(since SAP iRPA was not available then). However, most of our bots are interacting with SAP.
Keep enlightening our community. I will try to prepare an exercise, if i run into any new tools in SAP iRPA.
One question : How do I open the 'Desktop Agent' window appear in my windows system.
I know that its running via the Window services, however, i am unable to locate it in the Windows tray(extreme right corner-bottom area). Could you guide me here.
Hello Vinay Kumar Thanugundla
Thanks for the feedback.As soon as we run our app during development the desktop studio starts. You are irght its right corner bottom area. If see the icon just a click and it opens up the running project window.
i have done as described, the only problem is my excel is showing null or no object in debugging mode..could anyone help me out,im new to irpa
Great Post Nabheet. Share some more demo scenarios for us to learn.
Dear Nabheet, Hello,
first of all I would like to thank you for the great guideline and time you spent on it.
I tried to proceed exactly the same, step by step, but I couldn't open the excel file. How is it possible?
Thanks in advance for your quick response in this matter.
// Initialize Excel
ctx.options.excel.newXlsInstance = true;
ctx.options.excel.visible = true;
ctx.options.excel.displayAlerts = false;
// Open Excel
// Set cell
ctx.excel.sheet.setCell(1, 1, 'RPA');
// Save Excel
// Close Excel
// End Excel
sc.endStep(); // end Scenario
And the error message while running debugger:
Thanks for the feedback. From the log i can see path is not correct. It is missing slashes.
HI Nabheet, even im facing the same issue..but i have provided the double slashes which is not being displaced in debugging mode
'C:\\Users\\madhavi\\Documents\\SAP\\Intelligent RPA\\Desktop Studio\\ReadDataFromExcel\log\\book1.xlsx'
Hi madhavi ess – I was also getting the same issue and I later realized that I had named the file as "PO.xlsx", so the full name becomes "PO.xlsx.xlsx" :D....
Please check if this is not the case for you 🙂
hi srinivas i tried this is not working ...i am getting "No excel found create a new one"