Is it possible to add or remove entries to an excel file or a text file while it is still open (viewing live update of values from python output) instead of seeing the output in
It depends on the application you are using to view the file. You will have to check the features available in the tools you are using.
For instance, in Excel, this is impossible. When you open an Excel document, it actually creates an invisible copy. You are not editing the original. It is only when the file is saved that the original is updated. So, if you have a file my_excel_file.xlsx
, when you open it, another file is created named ~$my_excel_file.xlsx
. So, editing the original file will not update the file being viewed in the Excel application.
For text files, on the other hand, there are some applications that will reload changes from disk. Sublime Text is an example of this. If you have a file open in Sublime Text, then make a change to the file with another program, Sublime Text will automatically reload the new version when the application regains focus.