Showing results for 
Search instead for 
Did you mean: 
New Member

Edit a Cell in Excel with powerapps



I am currently working on an App in PowerApps but I am running into some issues. I do not have much experience with PowerApps nor with programming in general. I have to search for a specifix cell in an Excel table and update the cell beside it, when I push a button.


An expample: 

My table is called "Printer_Toners"

The collumn where I have to search is called "Toners" and the collumn where I have to edit is called "Stock".


I now have to search for the toner called "CF280X" (marked red) and when I push a button it has to update the cell beside it (in the "stock" column, marked blue) by taking the current number and minus it with 1 (x-1).




How can I do this?


Thanks in advance!


Kind Regards



Re: Edit a Cell in Excel with powerapps

Hello jesp8789,

This should be possible. I assume you have an application with an EditForm control (EditForm1 for example) that is bound to your Excel file. If so then try the following:


1. Click on the form data card that contains the Toner Count field. The card should have a Text Input control that displays the Toner Count value. Note the data card name from the Advanced Panel on the right (for example Toner_DataCard2)

2. Select the Screen that contains your form (for example EditScreen1)

3. Set EditScreen1.OnVisible = UpdateContext({count:Toner_DataCard2.Default}) Here the Toner_DataCard2 is the card name from step 1 and EditScreen1 is the screen name. Those may be different in your case.

4. Select the card again and unlock it from the Advanced Panel (the lock icon that says "Unlock to change properties)

5. Select the Text Input control that displays the Count value. Its default value must be set to something like "Parent.Default". Set it to count (the value from step 3): 

6. Add a button Control to the same card. Set Button.Text = count. Now yhou should have a Text Input control and a Button control that show the same value

7. Set Button.OnSelect = UpdateContext({count: count - 1});SubmitForm(EditForm1)

Now, clicking on the button should decrease the count value and submit the changes in one step. Note that you could hide the Text Input control and style your button as you whish. 



New Member

Re: Edit a Cell in Excel with powerapps



I also have the same problem - i am unable to fix it with you solution, are you sure it's working ?

Super User
Super User

Re: Edit a Cell in Excel with powerapps


I am not working with excel but you can try this:

If Stock items are strings:

If Stock items are numbers:

New Member

Re: Edit a Cell in Excel with powerapps



It's not working the way I wanted it yet. I am currently working on a different solution, and it seems to be working at the moment. I will let you know as soon as I am finished with the App.


Kind regards


Helpful resources

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.


New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,914)