I am building a app that, There will be a button and on click it will take an excel file from the user local and that will directly get inserted to SQL DB if all row matches then insert other wise error message "Invalid columns"
Is this possible? If yes please help me, because I have looked many articles but didn't find any that solves this issue.
You will have to design a Power Automate flow to perform these actions with your Power Apps. Here are the high-level steps -
1. Add an Attachment control in Power Apps to allow upload of files
2. Create a flow with Power Apps as trigger, use file name and file content values to upload file in OneDrive / SharePoint
3. Then use, "List rows present in a table" to get all rows from the table
4. Use SQL "Insert row (V2)" to insert rows in the DB. It will give you an error if the columns won't match.
5. You can also configure it to skip the rows which throw an error and move to the next row in table.
Hope this helps.
Kind regards,
Nandit
If this answers your query, please mark this response as the answer.
If its helpful, please leave a like. Thanks!
Was this reply helpful?YesNo
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.