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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch Not writing to E...
Power Apps
Answered

Patch Not writing to Excel on OneDrive

(0) ShareShare
ReportReport
Posted on by

I have an Excel sheet on OneDrive that I wish to write some data to.  I know this isn't the preferred method for PowerApps but I just need to show how this would work then I plan on getting the Ok to move to Azure SQL for the back end.  

 

However, when I try to write the Batch_Number I get nothing and I am wondering if I must write data for every column in the table.  Right now I have this for the buttons OnSelect property:

Patch(Green_Data, Default(Green_Data), {Batch_Number: greenBatchLoadingBatchNumber.Text})

greenBatchLoadingBatch_Number is also a label that gets its value from a previous screen.  Should I change that to a textInput and disable it?

 

In Green_Data there are 20 columns(including the PowerApps Id column).  Does there need to be info for each column for it to write or what am I doing wrong.

 

Thanks

 

 

Categories:
I have the same question (0)
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    I am not sure if this is just a typo but Default(Green_Data) should be Defaults(Green_Data). You don't need to update each field with the Patch, only the required fields.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Hey Jeff, 

     

      Yea that was a typo on my end in that code block.  

     

    I figured out what it was. 

    When I created the Green_Data table in my excel sheet I had the Table size preset for 10000 rows (or records), all blank.  So my patch function was working, it was writing the Batch_Number on row 10001, outside of my defined table.  I figured this out by selecting that column and seeing Count: 12 in the bottom.  I thought how could there be 12 if nothing is showing up in A2.  So I scrolled all the way down and sure enough my 12 button clicks were all right there.  Now I need to fix all my other tables that I plan to write too.

     

    Thanks for the quick repsonse,

    Ryan

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard