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 Apps / Help exporting to Exce...
Power Apps
Answered

Help exporting to Excel file

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello.

 

I’m trying to build my first PowerApp to fill a front office management need.

I’ve build (design) my app, with some text boxes, dropdown menus and a button.

Also, I was able to somehow connect an Excel file saved at OneDrive for Business.

The button is working as expected, changing properties of different items when clicked.

 

What I need is to save some text information to that Excel file, but I guess I’m missing some collect know-how.

The Excel file is very simple with some columns to be recorded (user name; date when first clicked the button, date when clicked the button second time, and the dropdown option).

Can you help me understand how to export this information?

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    HI I don't really understand your issues.

    Do you want to add ned lines in your excel table ? If so, you can first try using a Form control in your powerapps, linked to your Excel connection. Change the FormMode property of the form control to New and add a button with the OnSelect property set to SubmitForm(FormName) to add a new item.

     

    You can follow the same indications but change the FormMode to Edit to edit existing lines.

     

    If you are advanced with PowerApps, you could use the Patch() function

     

    Hope it helps

     

    regards

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Could you please share a bit more about your scenario?

    Do you want to patch record into your Excel table via clicking the Button control?

    Further, could you please share a screenshot about your app's configuration?

    Based on the needs that you mentioned, I suppose that you want to save a new record into your Excel table or update an existing record in your Excel table via clicking a Button, is it true?

    Based on the needs that you mentioned, I think the Patch function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

    If(
     IsBlank(LookUp(YourExcelTable, UserName = UserNameTextInput.Text)), /* Check if there already has a record existed in your Excel table */
     Patch( /* <-- Add new record */
     YourExcelTable,
     Defaults(YourExcelTable),
     {
     UserName: UserNameTextInput.Text,
     FirstDate: Now(),
     ...
     }
     ),
     Patch( /* <-- Update existing record */
     YourExcelTable,
     LookUp(YourExcelTable, UserName = UserNameTextInput.Text),
     {
     UserName: UserNameTextInput.Text,
     SecondDate: Now(),
     ...
     }
     )
    )

    Note: I assume the UserName is a column in your Excel table, which could identify one record uniquely. In addition, I assume that you want to save a record into your Excel table when you firstly click the Button, and want to update an existing record when you secondly click the button.

    More details about Patch function in PowerApps, please check the following article:

    Patch function

     

    Best regards,

    Kris

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for your post @Anonymous - can you review the responses from @Anonymous and @v-xida-msft and advise if they solve your issue?

     

    @Anonymous

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard