What do you want to save?
Add Code snippet
New code examples
-
Other 2022-01-22 12:36:05
To convert an Excel file to PDF, simply operate Excel from win32com
import win32com.client from pywintypes import com_error # Path to original excel file WB_PATH = r'C:\hoge\fuga\YearCalendar.xlsx' # PDF path when saving PATH_TO_PDF = r'C:\hoge\fuga\YearCalendar.pdf' excel = win32com.client.Dispatch("Excel.Applic... Add solution -
Python 2021-10-28 18:53:09
python outlook download attachment
import win32com.client #pip install pypiwin32 to work with windows operating sysytm import datetime import os # To get today's date in 'day-month-year' format(01-12-2017). dateToday=datetime.datetime.today() FormatedDate=('{:02d}'.format(dateToday.day)+'... Add solution -
Python 2021-10-23 16:46:07
python open excel application
from win32com.client import Dispatch xl = Dispatch("Excel.Application") xl.Visible = True # otherwise excel is hidden # newest excel does not accept forward slash in path wb = xl.Workbooks.Open(r'C:\Users\300231823\Desktop\GUI\simplenew4.xls')... Add solution -
Python 2021-09-18 16:09:03
python email exception error
#This gives feedback on errors within a script which then emails output import win32com.client import os import sys try: #Some code except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() fname = os.path.split(exc_tb.tb_frame.f_co... Add solution -
Python 2021-08-28 03:57:01
python integrated with activeX
import win32com.client xlApp = win32com.client.Dispatch("Excel.Application") xlApp.Visible=1 workBook = xlApp.Workbooks.Open(r"C:\MyTest.xls") print str(workBook.ActiveSheet.Cells(i,1)) workBook.ActiveSheet.Cells(1, 1).Value = "... Add solution