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 / How to add 2 new colum...
Power Automate
Unanswered

How to add 2 new colums in excel in power Automate Desktop

(0) ShareShare
ReportReport
Posted on by 8

How to add 2 new colums in excel in power Automate Desktop

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

    @up_1 

    Could you please elaborate your exact requirements pls?

  • up_1 Profile Picture
    8 on at

    i have an excel sheet  i want to 2 more columns with name  and age as column names

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

    @up_1 

    Please follow the below suggested actions:

     

    Method1(Efficient Method):

    1. Launch Excel file

    2. Use "Get First Free Column/ Row from Excel worksheet" and get firstfreecolumn number

    3. then use "Write to Excel worksheet" action to insert new column in left side of last column "Name"

    4. Repeat same action one more time to insert another column named as "Age"

    5. Save the Excel

    Deenuji_0-1708966669113.png

    Deenuji_1-1708966800124.png

     

    Code:

    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''Y:\\Accounts_Details.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.GetFirstFreeColumnRow Instance: ExcelInstance FirstFreeColumn=> FirstFreeColumn FirstFreeRow=> FirstFreeRow
    Excel.WriteToExcel.WriteCell Instance: ExcelInstance Value: $'''Name''' Column: FirstFreeColumn Row: 1
    Excel.WriteToExcel.WriteCell Instance: ExcelInstance Value: $'''Age''' Column: FirstFreeColumn + 1 Row: 1
    Excel.SaveExcel.Save Instance: ExcelInstance

     

     

    Method2(Not Preferred- We can't create with specified column name):

    1. Launch Excel file

    2. Use "Get First Free Column/ Row from Excel worksheet" and get firstfreecolumn number

    3. then use "Insert column to Excel worksheet" action to insert new column in left side of last column

    4. Repeat same action one more time to insert another column

    5. Save the Excel

    Deenuji_0-1708965977664.png

     

    Code(Copy and Paste the below code in your PAD designer screen):

    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''Y:\\Accounts_Details.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.GetFirstFreeColumnRow Instance: ExcelInstance FirstFreeColumn=> FirstFreeColumn FirstFreeRow=> FirstFreeRow
    Excel.InsertColumn Instance: ExcelInstance Column: FirstFreeColumn - 1
    Excel.InsertColumn Instance: ExcelInstance Column: FirstFreeColumn - 1
    Excel.SaveExcel.Save Instance: ExcelInstance

     

     

    If I've successfully resolved your queries, please consider accepting this as the solution and giving it a thumbs up. Your feedback is greatly appreciated!

     

     

     

     

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

    @up_1 

    Please follow Method1 as mentioned above; it should serve your purpose.

     

    If I've successfully resolved your queries, please consider accepting this as the solution and giving it a thumbs up. Your feedback is greatly appreciated!

     

     

  • Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 2 on at

    Hi @up_1 ,

     

    2 different steps you can use.

    1st write excel

    2nd Insert Column

     


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

    Regards,
    Riyaz

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

    Hi @up_1 

    Any update on this? Have you tried above suggested method?

     

     

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 132

Last 30 days Overall leaderboard