Writing to Excel via portal submission

Loading

Although Power Pages does not natively support writing directly to Excel files, you can achieve this via Power Automate integration.


Common Use Cases

  • Exporting portal form data to Excel
  • Maintaining a simple log/report for external stakeholders
  • Sharing Excel sheets with teams outside Dataverse

Implementation Steps

Flow with Power Automate (recommended way)

  1. Create your Excel file:
    • Store it in OneDrive for Business or SharePoint Online.
    • Make sure it has a table defined with columns matching your expected input.
  2. Create a Power Automate Flow:
    • Trigger: “When a row is added” to a Dataverse table (or “When an HTTP request is received” if calling it directly).
    • Action: “Add a row into a table” (Excel Online connector).
      • Map form fields to Excel table columns.
  3. Trigger Flow from Power Pages:
    • Use a Custom Web Page + Form + JavaScript to call a Power Automate Flow via HTTP.
    • OR configure form submission logic to update a Dataverse record that in turn triggers the flow.

Notes and Best Practices

  • Ensure the Excel file is formatted as a table (Insert > Table > Name the table).
  • Set appropriate permissions on SharePoint/OneDrive file.
  • Use validation and throttling logic to avoid overwriting/malformed data.
  • Use row ID or timestamp to uniquely log submissions.

Example Scenario

NameEmailMessage
John Smithjohn@email.comHello portal!

→ After submitting the portal form, this row is appended to a SharePoint-hosted Excel sheet in real time via Power Automate.

Leave a Reply

Your email address will not be published. Required fields are marked *