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 / Modifying excel dataso...
Power Apps
Answered

Modifying excel datasource

(0) ShareShare
ReportReport
Posted on by 34

Hi,

 

I have a requirement to modify excel data source.

I have a dropdown to which I have binded a datasource by importing excel file.

Attachment.jpg

 

When I click on 'Add Item' button is it possible to add another item to the excel datasource and refresh the dropdown.

Attachment 1.jpg

 

Regards,

_arc

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @_arc 
    Yes, it is possible.  Create a new Text Input then write the word Pineapple inside it. 

     

    Next, put this code in the OnSelect property of the "Add Item" button.

    Patch(excel_table_name, Defaults(), {Source: TextInput1.Text});
    Refresh(excel_table_name);

     

    Now, pineapple will appear as an option.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

  • _arc Profile Picture
    34 on at

    Hi, 

     

    I tried the solution but it is not working.

    I added an Id column and data is in table format also.

    ItemsTable datasource has been imported from 'Import from Excel' option.

     

    Attachment.jpg

     

    Attachment 1.jpg

     

    Name of excel table is 

    Attachment 3.jpg

    I am getting the below error I am not able to add new items.

     

    "The datasource is readonly or does not have a primary key, so function Patch can't write to it."

     

    I tried both the formulas below

     

    Patch(ItemsTable, Defaults(), {Source: txtItems.Text});  //Defaults() cannot be empty expects a parameter

    Patch(ItemsTable, Defaults(ItemsTable), {Source: txtItems.Text});

     

    Regards,

    _arc

     

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @_arc ,

     

    Please notice that the Excel Table connected by 'Imported from Excel' connector is read-only by design. The data added to the app is static and can't be modified.

    Please change to upload the Excel spreadsheet to OneDrive for business or other could storages, and connect the excel table by that could storage connector. 

    Hope this helps.

    Sik

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard