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:
Document doc = new Document(MyDir + "Pdf Document.pdf");
doc.Save(ArtifactsDir + "BaseConversions.PdfToXlsx.xlsx")
นอกจากนี้ เมื่อใช้ Aspose.Words คุณสามารถค้นหาสตริงหรือนิพจน์ทั่วไปเฉพาะในเอกสารของคุณและแทนที่ด้วยสตริงที่ตรงกันที่คุณต้องการ จากนั้นคุณยังสามารถบันทึกผลลัพธ์เป็นรูปแบบ XLSX ได้
ตัวอย่างโค้ดต่อไปนี้แสดงวิธีการค้นหาและแทนที่การดำเนินการและบันทึกผลลัพธ์ลงใน XLSX:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Ruby bought a ruby necklace.");
// We can use a "FindReplaceOptions" object to modify the find-and-replace process.
FindReplaceOptions options = new FindReplaceOptions();
// Set the "MatchCase" flag to "true" to apply case sensitivity while finding strings to replace.
// Set the "MatchCase" flag to "false" to ignore character case while searching for text to replace.
options.MatchCase = true;
doc.Range.Replace("Ruby", "Jade", options);
doc.Save(ArtifactsDir + "BaseConversions.FindReplaceXlsx.xlsx");
คุณยังสามารถระบุระดับการบีบอัดเมื่อบันทึกโดยใช้คุณสมบัติ CompressionLevel
ตัวอย่างโค้ดต่อไปนี้แสดงวิธีการระบุระดับการบีบอัดเมื่อบันทึกเป็นรูปแบบ XLSX:
Document doc = new Document(MyDir + "Document.docx");
XlsxSaveOptions saveOptions = new XlsxSaveOptions();
saveOptions.CompressionLevel = CompressionLevel.Maximum;
doc.Save(ArtifactsDir + "BaseConversions.CompressXlsx.xlsx", saveOptions);
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.