Read from Excel file as attachment and store information in third party system

excel
activities

#1

Hi

I have a scenario like this

  1. We get an automated email from external with an email attachment.
  2. We open the attachment and read the data (it has 5 columns and 2-3 rows of data)
  • i have done the above and the workflow seems to check the email and look for attachment

The next steps are taking the information from the columns and inputting in a different system

  1. My question is how do i read the excel data with the columns and store it
  2. Next is how do i go ahead in opening the third party system and inputting the received data

Can someone please let me know as I am doing a POC just to showcase we dont need any human to do on a daily basis.

The third and 4th steps I m not sure how to proceed

Thanks

S


#2

Hi @srinivass

Here is an example, i hope it helps:
example.xaml (12.0 KB)


#3

Hi Ovi

That was quick,

I have saved the attachment in a folder.

But the absence info needs to be entered into some other system.

How do i go about with that, do i need to use recording functionality etc

I will look into your file

Thanks


#4

I got your sequence of steps.

Its a absence report which comes daily as a xlsx file

Someone sees the email and takes the information and enters into another system which is web based

The web based system takes username and password to logon and then we go to the required screen to enter the information from excel

I hope you get me here


#5

@srinivass you can use recorder or just the proper activities to go to the desired web app(Open browser, Type into username, Type secure text for the password, Click Login button).
Then you can use a For each activity to iterate the datatable and get your desired data from there. Ex: For each row in DT - Type into (some text box field you have there) row.toString.

I hope i got the main idea. What is the information you want to enter and where(what are the fields)? For example, data from Row1 in a form in the web app.


#6

So you mean to say first i should create another sequence which logs into the third party system via a web url and then use the datatable variables which was
created after the excel application is saved, to be input into the system.

image

thats what i get in the excel file, i just need to logon to the web based system and then enter the information for that person there

what is the best practice in this kind of scenario, so that we split into different sequences and then call from main workflow


#7

You can have a sequence to read the excel file and extract the data you need. And another one to logon and enter data. Then invoke from the main workflow.


#8

Thanks

the third party system is a desktop application. if i have to pass the data which i have extracted, do i have to use a data table and store it and then when i invoke the desktop application access the values from the data table. Is my understanding right here


#9

I am trying to read from excel but it says sheet does not exist

Am i missing anything here,I have tried renaming it also

and my excel sheet file is like this


#10

I keep getting this error, can someone point me in the right direction

OutLookAttachement has thrown an exception

Source: Read Range

Message: The sheet does not exist

Exception Type: ArgumentException

System.ArgumentException: The sheet does not exist
at UiPath.Excel.WorkbookApplication.SetSheet(String sheetName, Boolean createNew)
at UiPath.Excel.Activities.ExcelInteropActivity`1.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)


#11

I am still unable tor read the excel file

I get the following, the data does exist in the excel file, but it opens and i dont see anything, i get a message box

this is my flow

Can some one tell what is wrong here

Thanks

S


#12

Hey

Can you let me know what is wrong with my flow

I am stuck at this step to get the values from excel and read it.

Thanks

S


#13

Hi Sri,

Your excel file looks empty now? Even when you open it manually?
I have the same workflow with the same data as you and the output is displayed in the message box:
test.zip (8.1 KB)

Maybe your excel file is corrupted somehow.


#14

Hi Ovi

When i open the file normally i can see the information.

image


#15

I created a new file and got it working. thanks for the suggestion, it didnt occur to me that file may have been corrupted.

I can see the first rows,but in the datatable i have 2 rows

i have given the read range correctly also, do i need to manually add a loop


#16

If you check the option Add Headers in Read Range activity it will extract the column headers also.
Like this:
Screenshot_44

You can add a loop to iterate and extract the data you want. For example:


#17

Excellent , thanks very much for that.

I have one more question, if i need to pass this information to a desktop application system. how do transfer data from this data table.

I have to use desktop recording for the application to login and navigate, but i m not sure of passing the excel information from data table to the desktop.

can you let me know the approach.

Thanks

S


#18

If your recording has a Type into for example, you could pass a variable to the input.
Screenshot_46

This will take the first value of the first column and type it in your text box.


#19

Thanks Ovi

I am unable to record the web application. when i try to record it says its using custom JRE.

Do i need to install the JRE as I dont have any permissions for it. Is there any other way to record the application.

Thanks

S


#20

How can I select a date one day before if there is only clicking option .
For ex : If I want to run a report on 25th September 2017 I need to select a one day before date i.e 24th Sep2017.