How to copy all from a note and paste into Excel?

Dear Experts

I need to open a specific txt file and copy all content in it

Then open a specific excel file and past above content start from cell A1

I try Use Application but it doesn’t work

May I know how to make it happen?

image

Thank you for your advise

@yangyq10

Use read text file activity
And then use generate datatable from text activity
And then ise write range workbook

@yangyq10,

Use Read text file activity to read data from text file instead of opening and reading through Notepad.

Then use Generate Data Table From Text to prepare a datatable

image

Use Write range activity to write the datatable to excel.

Thanks,
Ashok

@yangyq10
check below Xmal file as reference
input file: Data.txt (108 Bytes)
Main.xaml (7.5 KB)

Hie @yangyq10 here your logic :wink:
input
image
Activity jo need to convert txt data into data table format


Your Result in excel format
image
mark this solution if you find your result
cheers happy automation

hi @yangyq10 Utilize the Read Text File activity to obtain data from a text file rather than opening and reading it in Notepad. Afterwards, use the Generate Data Table From Text activity to construct a datatable.

@singh_sumit

Thank you for the solution
After I try, this solution help me input txt file in excel cell by cell, but that’s not working in this situation

Requester ask to keep all the format from the txt file just as below screenshot

They have a complex formulate in next sheet that all the content must be same

That’s why they ask me to ctrl+A and ctrl+C in txt file and directly ctrl+V in excel

May I know if there is another way to do so?

Sorry for the misunderstanding, my bad

@ashokkarale

Thank you for the solution
After I try, this solution help me input txt file in excel cell by cell, but that’s not working in this situation

Requester ask to keep all the format from the txt file just as below screenshot

They have a complex formulate in next sheet that all the content must be same

That’s why they ask me to ctrl+A and ctrl+C in txt file and directly ctrl+V in excel

May I know if there is another way to do so?

Sorry for the misunderstanding, my bad

@Krishna_Raj

Thank you for the solution
After I try, this solution help me input txt file in excel cell by cell, but that’s not working in this situation

Requester ask to keep all the format from the txt file just as below screenshot

They have a complex formulate in next sheet that all the content must be same

That’s why they ask me to ctrl+A and ctrl+C in txt file and directly ctrl+V in excel

May I know if there is another way to do so?

Sorry for the misunderstanding, my bad

Hie @yangyq10 ok get your point now i’m sending you the logic how you can write notepad data into the excel file
read your data from notepad
image
use Excel application scope for the excel file
use select range activity to write data in the selective sheet and set the range from A1
use set to clipboard activity and inside that pass the read text variable data
use send hotkey activity and indicate on the sheet and pass the hotkey - CTRL + V
and lastly use the save workbook activity

image

Hope this work on you .
mark this as solution …
cheers Happy Automation

1 Like

@singh_sumit

Sorry for the late reply. I was debugging with this solution and verifying data with requester this morning. And it works!!!

Thank you so much for helping me out
I already mark this reply as solution

Have a good day :laughing:

1 Like

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