I add data to an excel file or create it if non-existent and then add the data. After the code is finished writing, the person is capable of viewing the Excel file by opening it. But if the person forgets to shut the file before any further writing, a warning message needs to appear. So I want a way to check if this file is open before the writing process.
I tried solving this via several guides on StackOverflow: 1, 2, and 3
But nothing worked as it often did not even find the file except I gave it the exact path, or even did not differentiate between it being actually open or not. This small essential feature already cost me too much time.