S
S
Slytherin2019-11-05 20:35:27
Python
Slytherin, 2019-11-05 20:35:27

How to save open excel file?

I have an open excel file that I need to save. The whole problem is how to read this file if it is not saved on the computer, as it was opened from the browser using the selenium library.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Slytherin, 2019-11-07
@Slytherin

I solved the problem by creating a macro in excel. And I run it through python.

R
rPman, 2019-11-05
@rPman

As soon as you gave the file as a download, you lost access to it, it is not yours, and you already need to monitor its changes and savings on the user's side, and he can open it in 100500 ways, most of which you will not like (do not leave any options).
In your case, the file is in a temporary folder, it makes no sense to save it to the user, since after the application closes it will be automatically deleted.
Directions for reflection to solve your problem:
- look at solutions from Microsoft office.live.com, this is a cloud solution (and it seems including a local server, for an expensive price) that allows the user to open a document in a browser with an interface almost identical to a desktop application, by the way there are free limits .
- form the document in such a way that the macros in it control the changes and upload them in some format to your server, this will work in a limited list of situations, but at least it will.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question