I've made a script in python which fills in certain cells in excel sheets which are fetched from a kivy interface. It should send an email with the data entered and make some filled in excel sheets. It works as it should, but the last part is printing the sheets automatically.. :D I've come across a script and it works to print automatical, the only problem is that I do not know how to make it print single sided instead of double sided.
I'm using openpyxl to adjust the data in the sheets and this library has some features that can change printer settings like margins, but I did not find anything about one sided printing. Also, I did not find how to print with openpyxl, that's why I'm using win32com.
import os, win32com.client
o = win32com.client.Dispatch('Excel.Application')
o.visible = True
wb = o.Workbooks.Open(path)
ws = wb.Worksheets([1 ,2 ,3])
ws.PrintOut()
Does anyone have an idea how to change the printer output to one sided pages?
Thank you for your time and attention.