Copy content

Hi,
UI Automation Question:
I am trying to copy content from one file to other.

  1. Using “Desktop recording” selected text from File1.
  2. Used “Copy selected text” activity and it is showing in a message box. 3. Tried pasting in File2? CTRL + V is not working.
    Can you please suggest if there is a better way of doing steps1-3. Why is not the content showing in File2?
    Thanks a lot,
2 Likes

Hey @A_Learner

You are almost there

Just use type into in the file 2, and pass the output variable of copy selected text activity as input to type into.

This should help.

Thanks
#nK

1 Like

Hi @A_Learner,

Please, take a look at the attached file.

Main.xaml (8.5 KB)

NOTE: Change both files location (Start Process activity input)

I am not sure if you are using notepad for both files, if both files are .txt. So, feel free to share more details.

If you need extra help, please let me know.

Thanks!

Thank you! It works!

1 Like

Thank you, it works!
Will have to try MS Project to Excel, and from Excel to Project. Thanks a lot!

1 Like

@gustavo.cervelin
What changes are needed for the above example if it is copy from Exce File1 to Excel File2 using UI automation? Thank you!

1 Like

Instead of type into use write cell

Regards
Gokul

Hi @A_Learner,

It would be something like this:

Main.xaml (9.1 KB)

You can also use read range and write range instead of copying/pasting through send hot keys activity.

Main.xaml (5.3 KB)

Thank you. I cannot use read range and write range because the file1 is MS project and file 2 is excel.

When I copy text from file1 and trying to paste into file2 CTRL + V is not working. Write cell is pasting all the data in one cell. Any suggestions please?

Thanks,

1 Like

@Nithinkrishna
When I copy data from Project with Desktop Recording, the column headers are not getting selected. Only data is getting written into when I output the selected data.
Also “Type Into” Excel is taking time with huge data. Is there a better way?
Thanks for your time.

2 Likes

Hi @A_Learner,

Have you checked the first attached file (9.1 KB) of my last post?

It copies and pastes using CTRL+C and CTRL+V from an Excel file to another Excel file.

But, in your case, you are using MS Project. So, I am not sure if it will work

Hey @A_Learner

If you are doing manipulation it’s better to go with Excel Activities…

Thanks
#nK

Yes, thank you for the example file. Problem is that, with select range, I need to specify the range, for the data I am copying is dynamic, do not know number of columns or rows. For example, if specify “A1:P1”, data getting copied over the same line. Thank you,

1 Like

@A_Learner

Will it always start in a specific cell?

I mean, you don’t know the number of columns and the number of rows. But your know the start cell at least.

Thank you, @gustavo.cervelin

1 Like

Hi @A_Learner,

It was actually a question to better understand what you want to do.

Yes, I know the start cell. But do not know the number of rows or columns. Thank you.

1 Like

Hi @A_Learner,

Please, take a look at the attached file.

Main.xaml (13.5 KB)

It works even that we don’t know the number of rows and columns that should be copied.

But, this is from an Excel file to another Excel file.

From Excel to MS Project… I don’t know how it would work and what adaptations that should be made (if necessary), because I don’t have MS Project installed and I believe I won’t be able to install it.

Hope it helps you :slight_smile:

Appreciate your efforts @gustavo.cervelin

1 Like

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