@devesh
Try to collect the Sharepoint List in a Collection.
//Create a collection
ClearCollect(SPList,
{OrderID: 1001, Item: "Notebook", UnitsOrdered: 25, CostPerUnit: 2.5},
{OrderID: 1002, Item: "Crayons", UnitsOrdered: 15, CostPerUnit: 8.62},
{OrderID: 1003, Item: "Binders", UnitsOrdered: 10, CostPerUnit: 13.34},
{OrderID: 1004, Item: "Pencils", UnitsOrdered: 21, CostPerUnit: 1.5},
{OrderID: 1005, Item: "Erasers", UnitsOrdered: 30, CostPerUnit: 0.89}
);
//Collection to CSV code
ClearCollect(myCSV,{csvString:"OrderID,Item,UnitsOrdered,CostPerUnit"&Char(10)});
ForAll(
myOrders37,
Patch(
myCSV,
First(myCSV),
{csvString: First(myCSV).csvString&OrderID&","&Item&","&UnitsOrdered&","&CostPerUnit&Char(10)})
);
Set(mySolution37,First(myCSV).csvString)
Then use the button.Onselect
Copy(mySolution37)
Paste that in Excel.
Source: https://www.matthewdevaney.com/powerapps-collections-cookbook/export-a-collection-to-a-csv/
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.