Convertir a archivos MHTML en PHP

Aspose.Cells - Conversión a archivos MHTML

Para convertir la hoja de trabajo al archivo MHTML usando Aspose.Cells for Java en PHP, simplemente invoque la hoja de trabajo_a_Método mhtml() del módulo Converter.

Código PHP

 $sveFormat = new SaveFormat();

//Specify the file path

$filePath = $dataDir . "Book1.xlsx";

//Specify the HTML saving options

$sv = new HtmlSaveOptions($sveFormat->M_HTML);

//Instantiate a workbook and open the template XLSX file

$wb = new Workbook($filePath);

//Save the MHT file

$wb->save($filePath . ".out.mht", $sv);

Descargar código de ejecución

Descargar**Conversión a archivos MHTML (Aspose.Cells)**de cualquiera de los sitios de codificación social mencionados a continuación: