Hope someone can help, I've come at this multiple ways today!
I want to take an excel file from a sharepoint library and add a copy to a sharepoint list entry. I can get the file attached ok, but the file type doesn't come through as xls so cannot be opened.
I tried renaming the file to remove special characters, I tried copying the file in the workflow and attaching the copy, and I tried linking the file using OneDrive for Business instead of sharepoint. But all roads lead to this file type which won't allow me to view it.
Trigger: When an item is created or modified
Action: Get file content using file path
Action: Add Attachment
Outcome:
Shows OK in the list entry
But downloads as "File" not "Excel"
Outputs from Get file content:
Oh no! That is so obvious 🙂 thank you
Hi @lizstimo ,
Use Trigger - "When an item is created or modified" (SharePoint).
and Action - "Get file content using path" from SharePoint.
add Path to the Excel file in the SharePoint library.
to add attachment use Action "Add attachment"
from SharePoint site URL.
in file name: "yourfilename".xlsx
in file "File Content" output from "Get file content using path"
Ensure the file extension is correctly set to .xlsx in the "Add attachment" action.
Mark as solution if it helps.
Thanks,
Sandeep Mishra