Search code examples
excelinstancepower-automatepower-automate-desktop

Uploading an Excel File to a SharePoint Folder or Site using Power Automate Desktop and send an e-mail


I am trying to Upload an Excel File to a SharePoint Folder or Site using Power Automate Desktop.

But every time I try to upload it, the file uploads to the folder as an excel instance with the name "excel instance" instead of a variable I set before in my flow.

I can't find an option that allows me to convert the excel instance to an excel file and don't know if it even possible.

I have the Premium version, so if it helps, I can connect the flow with the cloud version of Power Automate

I tried the following steps.

  1. Setting the local file path as a variable see img,
  2. Converting the file to binary data (because the step - Create file - requires a file in Binary data format for "File Contents") see img,
  3. Creating the SharePoint File see img,
  4. Creating the link to the file using the Item id from step 3 see img,
  5. sending the e-mail with the link see img.

See steps here

I expected this to just upload an excel file to sharepoint but it uploads an "excel instance" [see img1


Solution

  • Ok, found the answer.

    It wasn't uploading an excel instance, but it was uploading a file without an extension.

    Why? Because when I uploaded the file, I was uploading just binary data, I did not specify and/or give instructions to the program to convert the binary data to a different file type.

    It was weird because I defined a variable beforehand that contained the extension.

    To fix this I added the right extension to the "file name" in the Create File action(in my case .xlsm).