I have an issue after saving the excel sheet and use a variable type IEnumerable I used a use Excel file activity however it’s keep telling me that the variable must be IEnumerable and i need to change it to be IO.fileinfo to be able to use the variable in the use excel file activity.
I’m assuming that the variable DownloadedFile came from other activity in your code which probably returns a IEnumerable to you.
The first thing you need to do is to work with indexing, meaning: IEnumerable is something like a list, so you need to explicity say in what position is the file that you want to work with. If you are 100% sure that you have only one file, then you could use: DownloadedFile(0) → which gives you first file of the IEnumerable.
You should know which data is in your IEnumerable, since is a IEnumerable of Strings, make sure if the string is not already the path you need. If it is, just to DownloadedFile(0)
If, for any other reason, you still need to use IO.FileInfo, you could convert using:
fileInfoVar = new FileInfo(path), where filoInfoVar is you variable of type FileInfo.
Are you using a file that is sync with oneDrive? If yes, try to copy the file manually to your machine and test it again, just for testing purposes.
Also, it could be a compatibility error, there are some steps you could try:
Open MS Excel (Any File or new file)
Pull up Task Manager
Click on MS Office or Excel Icon in Background Processes, Right click, and select properties
Under Compatibility, Click “Run Compatibility Troubleshooter”
When finished running, test file again, if it works right, click apply settings to this program. If it doesn’t work, click next and choose from the options. (I chose that it worked in previous version of Windows (Windows 7) Then click Next again.