Answer the question
In order to leave comments, you need to log in
How to save xlsx file to pdf?
Hello! The question is: how to save in PDF format through Excel? Or maybe some other way to convert? Here is the code:
try:
pythoncom.CoInitialize()
Excel = win32com.client.Dispatch("Excel.Application")
Excel.Visible = 0
wb1 = Excel.Workbooks.Open(u'D:\\test.xlsx')
wb1.SaveAs(u'D:\\test', FileFormat = 6)
wb1.Close()
except Exception as e:
print (e)
finally:
Excel.Quit()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question