How to solve number issue /

After I delete the duplicated row, I found the problem of the number still running like that

If there only have 6 row, it is supposed there is 1-6 in column A, how to delete the 7 as well. Can anyone can help me found out my problem and edit it? Many thanks
FA final + delete duplicate.xaml (70.1 KB)

Hi @Happydayyy

In the Input data may be there is empty row with item number. That’s why it was not deleted if you want to delete the last row in the excel you can use the Delete rows activity.

→ Use the Excel Process scope activity and insert the Use excel file inside of it.
→ Pass the Excel file path in the Use excel file activity.
→ Inside Use excel file activity insert the Find find/last row activity to get the last row number.

  • Give the source field value as Excel.Sheet(“FA for 4N”)
  • Give the Column name in the Column name field in your case it is “Item”
  • Create a variable in the Save last row number as field, let’s call the variable name as Lastrow.

→ After Find First/last row activity insert the Delete rows activity, give the values as below in Delete rows activity,

  • In what to table or range field give the range as Excel.Sheet(“FA for 4N”)
  • At Position field pass the Lastrow variable as Lastrow.toString.

Check the below workflow for better understanding,

Hope it helps!!

1 Like

Thank you so much
But what is the field, there are a lot of, which should i choose?


there still is an error after i choose field

FA final + delete duplicate + number problem.xaml (71.3 KB)
This is my latest workflow

You have made one mistake… @Happydayyy

Lastrow variable datatype is Int32 don’t change it to Field or any other datatype.

Check the below image for better understanding,

Hope you understand!!

But there is an error while I run the robot in the delete row activity. May i ask how I can cope with this?

Okay @Happydayyy

Before Delete rows activity insert a Message box and pass the Lastrow variable and check the what the value it was giving.

Send me the Screenshot after message box prompts.

Hope you understand!!


still in error…

what is the value prompts in Message box… @Happydayyy

So I need to create a message box and input the variable?

I need to use message box or log message before the delete activity?

@mkankatala Now my workflow is like this
FA final + delete duplicate + number problem.xaml (71.7 KB)

Could you help me to find a solution to fix it.
Best wish!!

Let me end this post and go to this post for my problem, many thanks!!:
Delete row activity

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.