Convierta POTX a XLTX a través de Java o en línea

API de Java local para exportar POTX a XLTX sin usar Microsoft® Excel o PowerPoint

 

Puede convertir un archivo POTX a XLTX a través de Aspose.Total for Java en dos pasos. En el primer paso, puede exportar POTX a HTML usando Aspose.Slides for Java . En segundo lugar, al usar Aspose.Cells for Java , puede convertir HTML a XLTX.

Cómo convertir POTX a XLTX a través de Java

  1. Abra el archivo POTX usando la clase Presentation
  2. Convierta POTX a HTML usando save método
  3. Cargue el documento HTML utilizando la clase Workbook
  4. Guarde el documento en formato XLTX usando save método

Requisitos de conversión

Para convertir POTX a XLTX, puede usar fácilmente Aspose.Total para Java directamente desde un Maven e incluya bibliotecas en su pom.xml.

Alternativamente, puede obtener un archivo ZIP de descargas .

// supports PPT, POT, PPS, PPTX, POTX, PPSX, PPTM, PPSM, and POTM input file formats
// instantiate a Presentation object that represents a PPT file
Presentation presentation = new Presentation("template.ppt");
// save the presentation as HTML
presentation.save("output.html", SaveFormat.Html);
// load the HTML file in an instance of Workbook
Workbook book = new Workbook("output.html");
// Supports XLS, XLSX, XLSB, XLSM, XLT, XLTX, XLTM, XLAM, CSV, TSV, TXT, MHTML, ODS, DIF, MARKDOWN, SXC, and FODS output file formats
// save HTML as XLS
book.save("output.xls", SaveFormat.Xls);

Convertidor en línea gratuito para POTX a XLTX

Requisitos de conversión

Usando la API, también puede abrir el documento protegido por contraseña. Si su documento POTX de entrada está protegido con contraseña, no puede convertirlo a XLTX sin usar la contraseña. La API le permite abrir el documento cifrado pasando la contraseña correcta en un objeto LoadOptions.

// initialize load options
LoadOptions loadOptions = new LoadOptions();
// set password
loadOptions.setPassword("123123");
// supports PPT, POT, PPS, POTX, PPSX, PPTM, PPSM, POTM, ODP, and OTP input file formats
Presentation presentation = new Presentation("template.ppt", loadOptions);
// save the presentation as HTML
presentation.save("output.html", SaveFormat.Html);
// load the HTML file in an instance of Workbook
Workbook book = new Workbook("output.html");
// Supports XLS, XLSX, XLSB, XLSM, XLT, XLTX, XLTM, XLAM, CSV, TSV, TXT, MHTML, ODS, DIF, MARKDOWN, SXC, and FODS output file formats
// save HTML as XLS
book.save("output.xls", SaveFormat.Xls);

Convierta POTX protegido a XLTX a través de Java

Al convertir un archivo POTX a XLTX, también puede agregar una marca de agua a su formato de archivo XLTX de salida. Para agregar una marca de agua, cree un nuevo libro de trabajo para abrir el archivo HTML convertido. Seleccione Hoja de trabajo a través de su índice, cree una Forma y use su función addTextEffect, establezca colores, transparencia y más. Después de eso, puede guardar su documento HTML como XLTX con marca de agua.

// supports PPT, POT, PPS, PPTX, POTX, PPSX, PPTM, PPSM, and POTM input file formats
// instantiate a Presentation object that represents a PPT file
Presentation presentation = new Presentation("template.ppt");
// save the presentation as HTML
presentation.save("output.html", SaveFormat.Html);
// load the HTML file in an instance of Workbook
Workbook book = new Workbook("XlsxOutput.xlsx");
// get the first default sheet
Worksheet sheet = book.getWorksheets().get(0);
// add Watermark
Shape wordart = sheet.getShapes().addTextEffect(MsoPresetTextEffect.TEXT_EFFECT_1, "CONFIDENTIAL",
"Arial Black", 50, false, true, 18, 8, 1, 1, 130, 800);
// get the fill format of the word art
FillFormat wordArtFormat = wordart.getFill();
// set the color
wordArtFormat.setOneColorGradient(Color.getRed(), 0.2, GradientStyleType.HORIZONTAL, 2);
// set the transparency
wordArtFormat.setTransparency(0.9);
// make the line invisible
LineFormat lineFormat = wordart.getLine();
lineFormat.setWeight(0.0);
// supports CSV, XLSB, XLSM, XLT, XLTX, XLTM, XLAM, TSV, TXT, ODS, DIF, MD, SXC, and FODS file format
// save HTML as XLS
book.save("output.xls", SaveFormat.AUTO);

Explore POTX opciones de conversión con Java

Convertir POTXs a JSON (Archivo de notación de objetos de JavaScript)