Skip to content
Advertisement

Is there a way to set up start viewing position in excel sheet?

Normally Excel remembers where you stopped at a sheet and when you open it next time it takes you right there. Is there a way to set up such a position when generating the document?

Advertisement

Answer

With the pywin32 package, you can control Excel with COM and automate anything that Excel can do.

Here’s an example that creates a simple worksheet, initializes some cells, selects a cell, then saves the document. When you later open the document it will restore to that same location.

JavaScript

Here’s the resulting file opened in Excel:

test.xlsx content

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement