Hello need support for type into excel

i am working on an automation the entering some values into my application and get some values and save it into variables. i have checked that the variables holds the correct data by using message box for the 3 variables. I have used type into activity to type the value into the correct cells in excel sheet. the problem is that after the robot stop i checked the file and it is empty. no data has been typed


Data Report.xaml (24.6 KB)
also i have tried the assigne approach to save into the current row the value into the variable but it is the same problem.

Hi,

Can you try Assign activity as the following?

And also check if content of companyName is not empty and the table has one or more rows except header.

Regards,

Hi @mohamed.saty2012,

You can use build data table activity to create a data table with the required columns. Add your data to it, and then use write data table activity with save changes marked in use excel file activity

Hi @mohamed.saty2012 ,

Could you please share a snap of properties pane for

Use excel and type into activity.?


i have already done it. an it gives me the same result

As you mentioned are you getting the company name I have one question, This company name is stored in an Excel file or did you get it from the website?

will you clarify this?, so I’m able to help you.

i have 3 variables one from another excel sheet and the other two is from the application. also, as i mentioned before used message box before the excel activity to make sure that the variables hold the correct values, and they hold it correctly but didn’t write it down to the another excel sheet.

Hello @mohamed.saty2012

I have done the same activity as you explain to me and it’s working properly.

This is Excel file
image

Probably your problem solution is:

  1. Might be your variable scope is limited define them to Main Sequence.
  2. You’re using an unstable version of an Excel update from Mange Packages.

I hope this is helpful to you.
Akhil

Hi @mohamed.saty2012 ,

I could see that you are using an UI Automation activity instead Please try using ’ write cell’ activity. That would be the best for writing in a particular cell of an excel. Attaching the official documentation from UiPath site for the same,

See if this helps you, in case you face any challenges using this activity let me know happy to gelp further…

Happy automating.

Thanks,
Gautham.

it works but when i remove for each row. but the problem is that the robot doesn’t build up it overweight the Firstline over and over how to make the robot leave the data and keep add the new data do not replace them. as this will be report for the end of the day

it works but when i remove for each row. but the problem is that the robot doesn’t build up it overweight the Firstline over and over how to make the robot leave the data and keep add the new data do not replace them. as this will be report for the end of the day

You can Find the last row in the excel sheet before starting add data, and start iterating your loop accordingly.

This would avoid the issue of data being replaced.

Hello @mohamed.saty2012,

In your case, you are using Excel scope and want to write data into your Excel file, But you are using “Type into Activity” This activity writes data in the same cell.

Solution: Use “Write Cell Activity

after selecting cell Range (Where you want to write your data, select from Indicate in Excel

image

after selecting range your Write Cell Activity Looks like the above Screen Short
and if you want your cell to move in Excel automatically. Make sure to check Auto Increment Row

I hope this is helpful to you.
Akhil Pandey

the autoincrement option is on and it keeps right on the same line. how i can make it if there is a data at the cell wright to t


he next

could you please show me how you show me how

Hi @mohamed.saty2012 ,

Step 1 : Use a Read Range Activity , Pick a column in the sheet with no Null or blank cells.

Step 2 : Use an Assign Activity, create a int32 variable and assign the value datatable.Rows.Count - 1 (DataTable - output Variable from Read Range activity)

Step 3 : Use a While loop with initial value set the last row + 1 and exit condition with (lastRow + Input Data Table (From which data table data is being taken for writing))

I think the issue is writing the value to the cell, you can do this by using two whys but you need to check anything is not overriding the value.

1 Create Data table and add your data table and write the value, you need to add all value in a single data table and write the same in Excel

2 You need 3 different variables and write the values one by one write in a specific cell

kindly this is what i have done until now it should work but it keeps writ at the same row. can anyone see the .xaml an
Data Report.xaml (21.7 KB)
Data Report.xlsx (9.1 KB)
adjust what is wrong please. i don’t know what is that i am doing wrong.

Hello @mohamed.saty2012,

As your explanation i have made this, might be it helpful to you.

DataReport.zip (12.5 KB)

Thank you
Akhil