Can't read Excel file that is already open

Hello,

with KNIME 5.2 we changed the way how the Excel Reader uses the underlying library (Apache POI) to read Excel files in order to support reading larger files (that would previously exceed the Heap space when read).
Unfortunately, it seems that there is a special exclusive lock present when Excel (or any other MS Office program/Office file) opens an Excel file located in OneDrive specifically (which caught us by surprise, to be honest). This lock seems to be different than normal file locks on Windows and is probably there to support the tightly integrated Office sync functionality, which is why files located outside of OneDrive continue to work.
Since we have not found a robust way to detect this special case where it could be somewhat OK to ignore the exclusive file lock, we cannot simply revert the behavior, unfortunately, as it would otherwise remove the possibility to read larger Excel files again and possibly introduce subtle data loss or wrong computations when simply ignoring any file locks. If you are interested in a more technical background I can gladly provide what we have been able to find out.

4 Likes