Hi, I am trying to get an email attachment from Outlook, add the current month and year to the file name and save the file in a SharePoint location.
The problem I am getting is that once I have the file when I try to open it I get an error message -
"Excel cannot open the file "FileName.xlsx" because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file"
I suspect that the problem is coming from the way I try to get the file extension by using a Compose action and the following expression -
last(split(variables('AttachedFile-Name'), '.'))