คุณสามารถแปลงไฟล์ POT เป็น XLTX ผ่าน Aspose.Total for Java ได้ใน 2 ขั้นตอน ในขั้นตอนแรก คุณสามารถส่งออก POT เป็น HTML ได้โดยใช้ Aspose.Slides for Java ประการที่สอง โดยใช้ Aspose.Cells for Java คุณสามารถแปลง HTML เป็น XLTX
วิธีแปลง POT เป็น XLTX ผ่าน Java หรือทางออนไลน์
- เปิดไฟล์ POT โดยใช้คลาส Presentation
- แปลง POT เป็น HTML โดยใช้ [save]( https://reference.aspose.com/slides/java/com.aspose.slides/Presentation#save-java.lang.String-int-com.aspose.slides ISaveOptions-) วิธีการ
- โหลดเอกสาร HTML โดยใช้คลาส Workbook
- บันทึกเอกสารในรูปแบบ XLTX โดยใช้ save วิธีการ
ข้อกำหนดการแปลง
ในการแปลง POT เป็น XLTX คุณสามารถใช้ Aspose.Total สำหรับ Java ได้โดยตรงจาก Maven และรวมไลบรารีใน pom.xml ของคุณ
หรือคุณสามารถรับไฟล์ ZIP จาก ดาวน์โหลด
// 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); |
ตัวแปลงออนไลน์ฟรีสำหรับ POT เป็น XLTX
ข้อกำหนดการแปลง
คุณยังสามารถเปิดเอกสารที่มีการป้องกันด้วยรหัสผ่านได้โดยใช้ API หากเอกสาร POT ที่คุณป้อนมีการป้องกันด้วยรหัสผ่าน คุณจะไม่สามารถแปลงเป็น XLTX ได้โดยไม่ต้องใช้รหัสผ่าน API อนุญาตให้คุณเปิดเอกสารที่เข้ารหัสโดยส่งรหัสผ่านที่ถูกต้องในออบเจกต์ 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); |
แปลง Protected POT เป็น XLTX ผ่าน Java
ขณะแปลงไฟล์ POT เป็น XLTX คุณยังสามารถเพิ่มลายน้ำให้กับรูปแบบไฟล์ XLTX เอาต์พุตของคุณได้ ในการเพิ่มลายน้ำ ให้สร้างสมุดงานใหม่เพื่อเปิดไฟล์ HTML ที่แปลงแล้ว เลือกเวิร์กชีตผ่านดัชนี สร้างรูปร่าง และใช้ฟังก์ชัน addTextEffect ตั้งค่าสี ความโปร่งใส และอื่นๆ หลังจากนั้น คุณสามารถบันทึกเอกสาร HTML ของคุณเป็น XLTX ด้วยลายน้ำ
// 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); |