is there a way to use the view.insert function to a file that is not opened? thanks
No, because then you don’t have a view.