I want to write a python script that can take a screenshot of an excel file located at:
/Users/Desktop/Automation/file.xlsm
Right now I'm using pyscreenshot and doing it in the following way:
import pyscreenshot as ImageGrab
import os
im=ImageGrab.grab()
im.show()
ImageGrab.grab_to_file('/im.png')
But this takes the screenshot of the current open screen. I, instead want a screenshot of a particular file. How do I do it?