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 / Question relating to t...
Power Apps
Answered

Question relating to templates (excel) in model driven app

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have developed an app which consists of a dataverse table and a model driven app.

 

The idea is that the user would input data into the table using an excel template. I have tried to test this by trying to create the excel template by exporting the table (as empty) to excel, then saving the excel by a different name on my desktop and the uploading this new file as a template in the model driven app for me to use later. 

 

The first time when I try this template, everything seems to work as I expected when I download the template from the app, paste some data and import it back as an excel file. However, when I try it the second time, the template already has some data in it from the previous import. I would like the template to be empty regardless of the data in the table, so that the user can just use it to import new data without having to worry about accidentally overwriting some old data already in the table. Now the template seems to somehow work similarly to the "export to excel" button?

Categories:
I have the same question (0)
  • Jonathan Manrique Profile Picture
    2,695 on at

    Hi @Anonymous 

     

    The operation is similar in the case of the template you generate, only it comes in a csv format, normally when you export it is in xml format.
    Two points that are important: the csv you basically decide the columns of your template.
    In the export xml, it does so on the view you are in and extracts the data that is associated with the view. IN this case, also in Excel there are 3 hidden columns that are the identification data of the records.
    A technique that I use and it is very fast and good is to use XML export, I delete the data from the three hidden columns and the data from the rest of the column and it seems that I have a template

     

    If I have answered your question, please mark your post as Solved.

    If you like my response, please give it a Thumbs Up.

    You can accept more than one post as a solution

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Ok, yes I realized that there is 3 hidden columns in the excel meant for identifying the record.

     

    However, if I want the user to be able to import data through excel, isn't there a way that I can do this without having to delete these 3 hidden columns? I tried to import the excel with the same data two times (without touching the data), and it seems to import the rows twice, even though I havent touched the hidden columns or anything else, and the identify columns should be the same for the records? Isn't it possible to make a security role which would prevent the user from deleting / modifying the data that already exist in the table even if the data is imported through excel?

  • Verified answer
    Jonathan Manrique Profile Picture
    2,695 on at

    Hi @Anonymous 

     

    Through the security role you can restrict him from writing, so when it matters if it detects a change he does not have write permission.
    There is no way to lock the three columns of Excel.
    When you import and keep the same first columns without variation, and the rest without variation, when you import again it should not duplicate them, unless you activate the option to duplicate data

     

    Jmanriquerios_0-1698915904300.png

    If I have answered your question, please mark your post as Solved.

    If you like my response, please give it a Thumbs Up.

    You can accept more than one post as a solution

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Ok, I guess that could solve the problem I'm having (if not possible to save an empty template in the system by default) if it is possible through security roles to prevent the user from accidentally modifying / deleting records when importing new records. Thank you for the help! 🙂

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 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard