web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copy Paste Into Excel ...
Power Automate
Answered

Copy Paste Into Excel Table

(0) ShareShare
ReportReport
Posted on by 132

Hi, i succeed to copy text (Costumers) from a pogramm (textfield) with the keyboard command Ctrl + C. now i want this text paste to a excel table. This excel Table should have 2 Columns: Costumer and NR. Every time I run the flow the list should go on. For Example on the secon row should be a 2 with the costumer. on the third row 3 + costumer. 

 

The following screenshot is in german btw. 

Thank you!

 

 

image.png
I have the same question (0)
  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Zohaib1999,

     

    Please use action "Get First Free Column Row " to get first free row to write your data. Please find the below excel and code for your use case scenarios.

     

    Excel file:

    Deenuji_0-1707750747953.png

     Code:
    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Deenu\\Accounts_Details.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.GetFirstFreeColumnRow Instance: ExcelInstance FirstFreeColumn=> FirstFreeColumn FirstFreeRow=> FirstFreeRow
    Excel.WriteToExcel.WriteNamedCell Instance: ExcelInstance Value: $'''test''' CellName: $'''A%FirstFreeColumn%'''
    Excel.WriteToExcel.WriteNamedCell Instance: ExcelInstance Value: $'''test''' CellName: $'''B%FirstFreeColumn%'''
    Excel.SaveExcel.Save Instance: ExcelInstance

    Screenshot of code:

    Deenuji_1-1707750802383.png


    Thanks,

    Deenu

     

  • Zohaib1999 Profile Picture
    132 on at

    Does it list automaticilly ? 1,2,3,4 ... next to the costumers

  • Verified answer
    CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Zohaib1999 

    Yes, It does. Please find the below screenshots.

    1. In the below scenario Excel has only header so during the debugging "Get First Free Column Row " Action returns first free row as "2" 

    Deenuji_4-1707755249414.png

     

    2. After inserting the text value in the above scenarios, Now it shows next free row as "3".

    Deenuji_5-1707755269351.png


    Updated code:
    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Deenu\\Customer.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.GetFirstFreeColumnRow Instance: ExcelInstance FirstFreeColumn=> FirstFreeColumn FirstFreeRow=> FirstFreeRow
    Excel.WriteToExcel.WriteNamedCell Instance: ExcelInstance Value: $'''test''' CellName: $'''A%FirstFreeRow%'''
    Excel.WriteToExcel.WriteNamedCell Instance: ExcelInstance Value: $'''test''' CellName: $'''B%FirstFreeRow%'''
    Excel.SaveExcel.Save Instance: ExcelInstance

    Thanks,

    Deenu

    -----------------------------------------------------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up. Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 274 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 175

#3
Haque Profile Picture

Haque 166

Last 30 days Overall leaderboard