Convert Excel Spreadsheets by Python With Total Excel ConverterX

Please, download and install Total Excel ConverterX. Using the sample code below you will be able to convert XLS to PDF, DOC, TXT, etc.

 

  Example Python:

import win32com.client
import os.path

c = win32com.client.Dispatch("ExcelConverter.ExcelConverterX")

src="C:\\test\\test.xlsx";
dest="C:\\test\\test.pdf";

c.convert(src, dest, "-c PDF -log c:\\test\\Excel.log");

if not os.path.exists(file_path):
  print(c.ErrorMessage)
If you need examples on other languages please contact us. We will create any example specially for you.

Related topics