Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
يعد تحويل المستندات من تنسيق إلى آخر الميزة الرئيسية لـ Aspose.Words. يمكنك تحويل المستندات بأي تنسيق تنسيق التحميل متاح أيضًا إلى تنسيق XLSX.
يعد تحويل مستند إلى XLSX عملية معقدة إلى حد ما. لحفظ مستندك بتنسيق XLSX باستخدام Aspose.Words، استخدم فئة XlsxSaveOptions وعنصر Xlsx الجديد في تعداد SaveFormat. كما ذكرنا سابقًا، يمكنك حفظ المستند بأي تنسيق تحميل يدعمه Aspose.Words إلى XLSX.
يوضح مثال التعليمات البرمجية التالي كيفية حفظ PDF إلى XLSX:
doc = aw.Document(docs_base.my_dir + "Pdf Document.pdf")
doc.save(docs_base.artifacts_dir + "BaseConversions.PdfToXlsx.xlsx")باستخدام Aspose.Words أيضًا، يمكنك العثور على سلسلة محددة أو تعبير عادي في مستندك واستبداله بالتعبير المطابق الذي تحتاجه. ثم يمكنك أيضًا حفظ النتيجة بتنسيق XLSX.
يوضح مثال التعليمات البرمجية التالي كيفية إجراء عملية البحث والاستبدال وحفظ النتيجة في XLSX:
from aspose.words import Document, DocumentBuilder
from aspose.words.replacing import FindReplaceOptions
doc = Document()
builder = DocumentBuilder(doc)
builder.writeln("Ruby bought a ruby necklace.")
# We can use a "FindReplaceOptions" object to modify the find - and -replace process.
options = FindReplaceOptions()
# Set the "match_case" flag to "True" to apply case sensitivity while finding strings to replace.
# Set the "match_case" flag to "False" to ignore character case while searching for text to replace.
options.match_case = True
doc.range.replace("Ruby", "Jade", options)
doc.save(ARTIFACTS_DIR + "BaseConversions.FindReplaceXlsx.xlsx")يمكنك أيضًا تحديد مستوى الضغط عند الحفظ باستخدام خاصية CompressionLevel.
يوضح مثال التعليمات البرمجية التالي كيفية تحديد مستوى الضغط عند الحفظ بتنسيق XLSX:
from aspose.words import Document
from aspose.words.saving import XlsxSaveOptions, CompressionLevel
doc = Document(MY_DIR + "Document.docx")
saveOptions = XlsxSaveOptions()
saveOptions.compression_level = CompressionLevel.MAXIMUM
doc.save(ARTIFACTS_DIR + "BaseConversions.CompressXlsx.xlsx", saveOptions)Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.