Hi All,
Please could you Help me in
a. Creating a Config File using Excel , where we can store all the related info like Paths, variables, etc. I have gone through the Academy Video under Advanced training BUT NOT able to understand it.
b. How to Use the Config file after created.
Please could you help me in advance as i am in need of same in my Project.
Much Appreciated your kind Help & Supports always…!!!
Let us take the standard UiPath ReFramework Config file as an example…
Open the file → InitAllSettings.xaml , try to understand the flow.
In the Config.xlsx file , we can see three sheets, where the values in these sheets are added into an Dictionary variable(We have to create it before hand).
First column(Name) will added as key of dictionary and second column(Value) as value of dictionary. so that whenever value is needed , we can call from the dictionary with the corresponding key.
Thanks a lot Santosh for Providing the Zip File - It would be more helpful for me to understand better. - Thanks again for your Quick Response
Have A great and Successful day…!!!
However you can create customized file according to requirement. This is a sample workflow from where you can have an understanding how to get values from Config file. This sample is also auto generated from RE Framework project, again you can customize it according to need
hope you are doing Great
I have a little drought in RE Framework files
I have gone through entire RE Framework files, what I have noticed it is well structured and it will helpful for Enterprise Application development!
My Dought is, whether we need to modify framework files in order to kill process, closeAllApplications and for others stuffs in order to close opend application etc
Actually Documentation is not clear as well as sample implementation project is not available for reference in forum! it will be Great Support if you will provide real time ideas or sample
If I am not using ReFramework and I need to save file path in config file and have to get the code deployed to other environment.
How can I make sure that my file path is universal across all the environments.
Because once I deploy the code to SIT or UAT , I am facing the file not found exception.
The config file path could be stored in a variable within project folder. You can create the path like this
input_file = Directory.GetCurrentDirectory() + “\config.xlsx”.
Doing so, you can move your project and keep your paths updated.
If you want the config.xlsx file to be accessible in the production environment (in case something needs to be edited and you don’t want to open the project code), we have found it helpful to create a naming policy and use a folder in the Users\Public\ directory. Something like this:
I am facing one problem while runing my application
I have two need to open one open the browser and then open the application.
I have mentioned both in Config.xlsx.
And put the application under the RE-Framework folder.
I am attaching my config file.Config.xlsx (20.7 KB)
Here what i am getting Error
Open Browser: Cannot communicate with the browser, please check the UiPath extension.
Program open the Browser but not application but still getting this error.
If i add one more sheet in Config file which contain only one column and i want to access all rows of that column but challenge is in config file we follow Key-Value pair and sheet contain only one column what will be the solution ??
Hey @Nidhi_Jain, Sorry for being late! Looks like you need enable the browser extension in UiPath for this issue. Let me know if you need any help over here.
I know I’m late, but I was intrigued by the question
I guess it depends on what you want to do with the data. You could just add the sheet, and put the same value (from your one column) in both Name and Value columns. This would enable the robot to read it, and allow you to use the values. This does however mean that you would need to know the values by name in order to retrieve them during execution (dicConfig(“valuename”).tostring). This kind of defeats the purpose of the config file, because you are basically hard coding the values this way.
A better method (and I think maybe better fitting most scenarios?) would be to add the sheet (for example “ExtraSheet”) to the Excel file, add an extra array in_argument (in_extrasheets) to the settings workflow that contains the sheetname, and then read the file and loop through the sheets in in_extrasheets just like you do with the settings and constants. In the for each row logic, you could add items to a list that you then put in an out_argument.
This would result you in a list that contains all values that you can loop through without having to know the values in it.