Excel Write Range not Always Releasing file

When looping over a Write range (no Excel scope) where there is no visibility to the process it will occasionally not release the file. UIPath will give me an error that it is in use. It seems the Excel process is not really running so what would be the best way to ensure a file is released?