
I need a button to upload only Excel file in Power Pages. Once the file uploaded in Power Pages, the file should be stored in Dataverse. Also, there are some validation rules for Excel file. If the excel data is not suitable , the file should not be imported.
How can I do that?
Nothing out of the box to do what you want.
If you were to use Notes Attachments then Notes attachments allow you to specify the mime-type, but that is about it (and it is not foolproof).
Validation also presents its own problems, if you want to reject during the upload then you need a real-time plugin that triggers pre-create - if you do this then you are restricted to a 2 min transaction. You may also find that you may need to bundle .DLLs (ILMerge etc - not a supported customization, or think it is still in Preview - Dependent assemblies) similarly have to consider versions of Excel because old versions have the old file structures.
If you allow upload and then validate as a separate process, this gives you more control e.g. you could process it in Flow or push it to Azure Service Bus - but these are 'background' processes so you cannot reject during upload.
Alternative would be to build a PCF control to handle the file upload as long as all your validation etc could be handled in JavaScript/TypeScript. Or maybe build something custom and then send the file to an in Azure Function / Web Service.