يمكنك تحويل ملف POWERPOINT إلى XLTX عبر Aspose.Total for Java في خطوتين. في الخطوة الأولى ، يمكنك تصدير POWERPOINT إلى HTML باستخدام Aspose.Slides for Java . ثانيًا ، باستخدام Aspose.Cells for Java ، يمكنك تحويل HTML إلى XLTX.
كيفية تحويل POWERPOINT إلى XLTX عبر Java أو عبر الإنترنت
- افتح ملف POWERPOINT باستخدام فئة Presentation
- تحويل POWERPOINT إلى HTML باستخدام Save طريقة
- قم بتحميل مستند HTML باستخدام فئة Workbook
- احفظ المستند بتنسيق XLTX باستخدام save الطريقة
متطلبات التحويل
لتحويل POWERPOINT إلى 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); |
محول مجاني على الإنترنت لـ POWERPOINT إلى XLTX
متطلبات التحويل
باستخدام API ، يمكنك أيضًا فتح المستند المحمي بكلمة مرور. إذا كان مستند POWERPOINT الذي تم إدخاله محميًا بكلمة مرور ، فلا يمكنك تحويله إلى XLTX دون استخدام كلمة المرور. تسمح لك واجهة برمجة التطبيقات بفتح المستند المشفر عن طريق تمرير كلمة المرور الصحيحة في كائن 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); |
تحويل المحمية POWERPOINT إلى XLTX عبر Java
أثناء تحويل ملف POWERPOINT إلى 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); |