POT dosyasını iki adımda Aspose.Total for Java aracılığıyla XLTX’ye dönüştürebilirsiniz. İlk adımda, Aspose.Slides for Java kullanarak POT’u HTML’ye aktarabilirsiniz. İkinci olarak, Aspose.Cells for Java kullanarak HTML’yi XLTX’ye dönüştürebilirsiniz.
Java ile POT'u XLTX'ye Dönüştürme
- Presentation sınıfını kullanarak POT dosyasını açın
- save kullanarak POT’u HTML’ye dönüştürün. ISaveOptions-) yöntemi
- Workbook sınıfını kullanarak HTML belgesini yükleyin
- Belgeyi save kullanarak XLTX formatına kaydedin. SaveOptions)) yöntemi
Dönüşüm Gereksinimleri
POT’u XLTX’ye dönüştürmek için Aspose.Total for Java’yı doğrudan bir Maven üzerinden kolayca kullanabilirsiniz. aspose/aspose-total) tabanlı proje ve kitaplıkları pom.xml’inize dahil edin.
Alternatif olarak, indirilenler adresinden bir ZIP dosyası alabilirsiniz.
// 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'den XLTX'e Ücretsiz Çevrimiçi Dönüştürücü
Dönüşüm Gereksinimleri
API’yi kullanarak parola korumalı belgeyi de açabilirsiniz. Giriş POT belgeniz parola korumalıysa, parolayı kullanmadan XLTX’ye dönüştüremezsiniz. API, bir LoadOptions nesnesinde doğru parolayı ileterek şifrelenmiş belgeyi açmanıza olanak tanır.
// 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); |
Korumalı POT'u Java ile XLTX'ye Dönüştür
POT dosyasını XLTX’ye dönüştürürken, çıktı XLTX dosya biçiminize de filigran ekleyebilirsiniz. Filigran eklemek için dönüştürülmüş HTML dosyasını açmak için yeni bir Çalışma Kitabı oluşturun. Dizini aracılığıyla Çalışma Sayfası’nı seçin, bir Şekil oluşturun ve addTextEffect işlevini kullanın, renkleri, şeffaflığı ve daha fazlasını ayarlayın. Bundan sonra HTML belgenizi Filigranlı XLTX olarak kaydedebilirsiniz.
// 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); |