Server with Lubuntu

My python-django based web application needs to open file (template file - blank excel dot xlsx), write some data into it and then save it on a shared folder of another ubuntu computer (server with Lubuntu). I have two options- I can first save the file after renaming into Lubuntu shared folder, open it and write data. Alternatively, I can open, write the data and then save as with custom name in Lubuntu shared folder. Appreciate anyone helping me out by giving the code for either the above or for some other purpose with similar requirement.