web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Answered

Export to Excel

(1) ShareShare
ReportReport
Posted on by 16
I am working on a checklist of items which is part of a gallery called galResults.  I created a flow based on a CoPilot search, but the issue i am having is the OnSelect for a button to initiate the flow.
 
The screen OnVisible where the gallery is
ClearCollect(colExportToExcel,galResults.AllItems)
 
 
The button OnSelect
ClearCollect(ExportCollection,galResults.AllItems);
Set(varJson,JSON(ExportCollection,JSONFormat.IgnoreBinaryData & JSONFormat.IgnoreUnsupportedTypes));
Set(ExportLink, ExportToExcel.Run(JSONData).link);
Launch(ExportLink)
 
This is the line giving me the error about Invalid Number of Arguments, recevied 1 expected 0
Set(ExportLink, ExportToExcel.Run(JSONData).link

My flow was built from this:
  1. Create a New Flow:
    • Go to Power Automate (flow.microsoft.com).
    • Click on Create and select Instant cloud flow.
    • Choose PowerApps as the trigger and name your flow (e.g., “ExportToExcel”).
  2. Add Actions to the Flow:
    • Initialize Variable: Add an action to initialize a variable to store the JSON data from PowerApps.
    • o Initialize variable
    • o - Name: JSONData
    • o - Type: String
    • o - Value: Ask in PowerApps
    • Create CSV Table: Add an action to create a CSV table from the JSON data.
    • o Create CSV table
    • o - From: JSONData
    • o - Columns: Automatic
    • Create File: Add an action to create a file in OneDrive or SharePoint.
    • o Create file
    • o - Folder Path: /YourFolderPath
    • o - File Name: ExportedData.csv
    • o - File Content: Output from Create CSV table
    • Create Share Link: Add an action to create a shareable link for the file.
    • o Create share link
    • o - File: ID from Create file
    • o - Link type: View
    • o - Scope: Organization
    • Respond to PowerApps: Add an action to respond to PowerApps with the shareable link.
    • o Respond to PowerApps
    • o - Add an output of type Text
    • o - Value: Web URL from Create share link
Any help is appreciated.  I am new at all this, so when it comes to these I spend much time looking for a fix but always come back to this forum for help. 
Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
    Hi
     
    Without seeing the trigger itself, the error means that you didn't actually add any inputs into the Trigger. I dont know if you choose V1 or V2 but just adding the Trigger won't make it accept the parameter that you are trying to pass, you need to add it as an input also which is a step I dont see you have done.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard