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.