Konvertieren in MHTML-Dateien in Python

Aspose.Cells - Umwandlung in MHTML

Um Worksheet in eine MHTML-Datei mit Aspose.Cells for Java in Python zu konvertieren, rufen Sie einfach worksheet auf_zu_mhtml()-Methode des Converter-Moduls.

Python Code

 saveFormat = self.SaveFormat

# Specify the file path

filePath = self.dataDir + "Book1.xlsx"

# Specify the HTML saving options

sv = self.HtmlSaveOptions(saveFormat.M_HTML)

# Instantiate a workbook and open the template XLSX file

wb = self.Workbook(filePath)

# Save the MHT file

wb.save(filePath + ".out.mht", sv)

\# Print message

print "Excel to MHTML conversion performed successfully."

Laufcode herunterladen

DownloadUmwandlung in MHTML (Aspose.Cells) von einer der unten genannten Social-Coding-Sites: