Conversion en fichiers Mhtml dans Jython

Aspose.Cells - Conversion en fichiers Mhtml

Pour joindre des documents à l’aide deAspose.Cells Java pour Jython. Ici vous pouvez voir un exemple de code.

Code Jython

 from aspose-cells import Settings

from com.aspose.cells import Workbook

from com.aspose.cells import HtmlSaveOptions

from com.aspose.cells import SaveFormat


class ConvertingToMhtmlFiles:

    def __init__(self):

        dataDir = Settings.dataDir + 'WorkingWithFiles/ConvertingToMhtmlFiles/'



        saveFormat = SaveFormat

        #Specify the file path

        filePath = dataDir + "Book1.xlsx"

        #Specify the HTML saving options

        sv = HtmlSaveOptions(saveFormat.M_HTML)

        #Instantiate a workbook and open the template XLSX file

        wb = Workbook(filePath)

        #Save the MHT file

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

        # Print message

        print "Excel to MHTML conversion performed successfully."



if __name__ == '__main__':        

    ConvertingToMhtmlFiles()

Télécharger le code d’exécution

Télécharger**Joindre des documents (Aspose.Cells)**à partir de l’un des sites de codage social mentionnés ci-dessous :